8000 CI Fix following scipy dev coo_matrix attr renaming (#28374) · scikit-learn/scikit-learn@7152419 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7152419

Browse files
authored
CI Fix following scipy dev coo_matrix attr renaming (#28374)
1 parent 8189bc3 commit 7152419

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sklearn/utils/tests/test_validation.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,13 @@ def X_64bit(request):
656656
X = sp.rand(20, 10, format=request.param)
657657

658658
if request.param == "coo":
659-
if hasattr(X, "indices"):
660-
# for scipy >= 1.13 .indices is a new attribute and is a tuple. The
659+
if hasattr(X, "coords"):
660+
# for scipy >= 1.13 .coords is a new attribute and is a tuple. The
661661
# .col and .row attributes do not seem to be able to change the
662662
# dtype, for more details see https://github.com/scipy/scipy/pull/18530/
663-
X.indices = tuple(v.astype("int64") for v in X.indices)
663+
# and https://github.com/scipy/scipy/pull/20003 where .indices was
664+
# renamed to .coords
665+
X.coords = tuple(v.astype("int64") for v in X.coords)
664666
else:
665667
# scipy < 1.13
666668
X.row = X.row.astype("int64")

0 commit comments

Comments
 (0)
0