8000 FIX AdaBoostRegressort test failure with numpy 1.10 · lesteve/scikit-learn@0f4fde7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f4fde7

Browse files
committed
FIX AdaBoostRegressort test failure with numpy 1.10
1 parent d75e1cf commit 0f4fde7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sklearn/ensemble/weight_boosting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from numpy.core.umath_tests import inner1d
3030

3131
from .base import BaseEnsemble
32-
from ..base import ClassifierMixin, RegressorMixin
32+
from ..base import ClassifierMixin, RegressorMixin, is_regressor
3333
from ..externals import six
3434
from ..externals.six.moves import zip
3535
from ..externals.six.moves import xrange as range
@@ -107,7 +107,8 @@ def fit(self, X, y, sample_weight=None):
107107
dtype = None
108108
accept_sparse = ['csr', 'csc']
109109

110-
X, y = check_X_y(X, y, accept_sparse=accept_sparse, dtype=dtype)
110+
X, y = check_X_y(X, y, accept_sparse=accept_sparse, dtype=dtype,
111+
y_numeric=is_regressor(self))
111112

112113
if sample_weight is None:
113114
# Initialize weights to 1 / n_samples

0 commit comments

Comments
 (0)
0