8000 MAINT fix scipy-dev tests by passing 1d vector to unique (#28137) · scikit-learn/scikit-learn@4c0b9c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4c0b9c4

Browse files
glemaitrelesteve
andauthored
MAINT fix scipy-dev tests by passing 1d vector to unique (#28137)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
1 parent 059de51 commit 4c0b9c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/datasets/tests/test_samples_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def test_make_classification_informative_features():
136136

137137
# Cluster by sign, viewed as strings to allow uniquing
138138
signs = np.sign(X)
139-
signs = signs.view(dtype="|S{0}".format(signs.strides[0]))
139+
signs = signs.view(dtype="|S{0}".format(signs.strides[0])).ravel()
140140
unique_signs, cluster_index = np.unique(signs, return_inverse=True)
141141

142142
assert (

0 commit comments

Comments
 (0)
0