@@ -200,7 +200,7 @@ def indexable(*iterables):
200
200
return result
201
201
202
202
203
- def _ensure_sparse_format (spmatrix , accept_sparse , dtype , order , copy ,
203
+ def _ensure_sparse_format (spmatrix , accept_sparse , dtype , copy ,
204
204
force_all_finite ):
205
205
"""Convert a sparse matrix to a given format.
206
206
@@ -220,9 +220,6 @@ def _ensure_sparse_format(spmatrix, accept_sparse, dtype, order, copy,
220
220
dtype : string, type or None (default=none)
221
221
Data type of result. If None, the dtype of the input is preserved.
222
222
223
- order : 'F', 'C' or None (default=None)
224
- Whether an array will be forced to be fortran or c-style.
225
-
226
223
copy : boolean (default=False)
227
224
Whether a forced copy will be triggered. If copy=False, a copy might
228
225
be triggered by a conversion.
@@ -260,8 +257,6 @@ def _ensure_sparse_format(spmatrix, accept_sparse, dtype, order, copy,
260
257
% spmatrix .format )
261
258
else :
262
259
_assert_all_finite (spmatrix .data )
263
- if hasattr (spmatrix , "data" ):
264
- spmatrix .data = np .array (spmatrix .data , copy = False , order = order )
265
260
return spmatrix
266
261
267
262
@@ -330,8 +325,8 @@ def check_array(array, accept_sparse=None, dtype="numeric", order=None,
330
325
if sp .issparse (array ):
331
326
if dtype_numeric :
332
327
dtype = None
333
- array = _ensure_sparse_format (array , accept_sparse , dtype , order ,
334
- copy , force_all_finite )
328
+ array = _ensure_sparse_format (array , accept_sparse , dtype , copy ,
329
+ force_all_finite )
335
330
else :
336
331
if ensure_2d :
337
332
array = np .atleast_2d (array )
0 commit comments