Skip to content

Commit be8b69c

Browse files
committed
[scipy-dev] fix for scipy dev attr renaming
1 parent d80ab81 commit be8b69c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sklearn/utils/tests/test_validation.py

Lines changed: 4 additions & 2 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"):
659+
if hasattr(X, "coords"):
660660
# for scipy >= 1.13 .indices 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+
# Also indices was renamed to coords in
664+
# https://github.com/scipy/scipy/pull/20003
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)