Skip to content

Commit 8863eda

Browse files
committed
Changing exception to TypeError in _validate_estimator
1 parent 5fd66bc commit 8863eda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/ensemble/_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _validate_estimator(self, default=None):
133133
Sets the base_estimator_` attributes.
134134
"""
135135
if not isinstance(self.n_estimators, numbers.Integral):
136-
raise ValueError(
136+
raise TypeError(
137137
"n_estimators must be an integer, got {0}.".format(
138138
type(self.n_estimators)
139139
)

0 commit comments

Comments
 (0)