8000 FIX error handling in SVM · scikit-learn/scikit-learn@4437d56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4437d56

Browse files
committed
FIX error handling in SVM
Didn't work when y not an array.
1 parent 232fad1 commit 4437d56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/svm/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ def fit(self, X, y):
681681
if X.shape[0] != y_ind.shape[0]:
682682
raise ValueError("X and y have incompatible shapes.\n"
683683
"X has %s samples, but y has %s." %
684-
(X.shape[0], y.shape[0]))
684+
(X.shape[0], y_ind.shape[0]))
685685

686686
liblinear.set_verbosity_wrap(self.verbose)
687687

0 commit comments

Comments
 (0)
0