Skip to content

Commit 8994094

Browse files
committed
fix for older scipy tests
1 parent 66abe0e commit 8994094

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/utils/tests/test_sparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_ensure_sparse_index_int32(constructor):
110110
def test_ensure_int32_raises(constructor):
111111
with pytest.raises(ValueError, match="too large"):
112112
rows, cols = [2, 0], [1, np.iinfo(np.int32).max + 1]
113-
if constructor._format == "csc":
113+
if "csc" in constructor.__name__:
114114
rows, cols = cols, rows
115115
A = sp.sparse.coo_array(([1.0, 2.0], (rows, cols)))
116116
sklearn.utils._sparse._ensure_sparse_index_int32(constructor(A))

0 commit comments

Comments
 (0)