8000 Bug fix in MeanShift.predict. Allowing sparse data now. · milana2/scikit-learn@7b88036 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7b88036

Browse files
author
Ana Milanova
committed
Bug fix in MeanShift.predict. Allowing sparse data now.
1 parent 3fd4bcb commit 7b88036

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/cluster/_mean_shift.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,6 @@ def predict(self, X):
496496
Index of the cluster each sample belongs to.
497497
"""
498498
check_is_fitted(self)
499-
X = self._validate_data(X, reset=False)
499+
X = self._validate_data(X, accept_sparse='csr', reset=False)
500500
with config_context(assume_finite=True):
501501
return pairwise_distances_argmin(X, self.cluster_centers_)

0 commit comments

Comments
 (0
0