Commit 53e83a44 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Raise an error if y is not None

parent 5ff8b6fa
......@@ -153,6 +153,12 @@ class SampleWrapper(BaseWrapper, TransformerMixin):
return self._samples_transform(samples, "score")
def fit(self, samples, y=None):
if y is not None:
raise TypeError(
"We don't accept `y` in fit arguments because "
"`y` should be part of the sample. To pass `y` "
"to the wrapped estimator, use `fit_extra_arguments`."
if is_estimator_stateless(self.estimator):
return self
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment