Skip to content

Commit c56caea

Browse files
glemaitrerth
andauthored
Update sklearn/datasets/tests/test_svmlight_format.py
Co-Authored-By: rth <rth.yurchak@pm.me>
1 parent 50bf0d6 commit c56caea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/datasets/tests/test_svmlight_format.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def test_dump():
263263
assert_array_equal(X2.sorted_indices().indices, X2.indices)
264264

265265
X2_dense = X2.toarray()
266-
if sp.issparse(X_input):
266+
X_input_dense = X_input.toarray() if sp.issparse(X_input) else X_input
267267
X_input_dense = X_input.toarray()
268268
else:
269269
X_input_dense = X_input

0 commit comments

Comments
 (0)