@ignore_warnings(category=DeprecationWarning)
def check_estimators_fit_returns_self(name, Estimator):
 (X, y) = make_blobs(random_state=0, n_samples=9, n_features=4)
 y = multioutput_estimator_convert_y_2d(name, y)
 X -= X.min()
 estimator = Estimator()
 set_testing_parameters(estimator)
 set_random_state(estimator)
 assert_true((estimator.fit(X, y) is estimator))

@ ignore_warnings ( category = DeprecationWarning ) def check_estimators_fit_returns_self ( name , Estimator ) : ( X , y ) = make_blobs ( random_state = 0 , n_samples = 9 , n_features = 4 ) y = multioutput_estimator_convert_y_2d ( name , y ) X -= X . min ( ) estimator = Estimator ( ) set_testing_parameters ( estimator ) set_random_state ( estimator ) assert_true ( ( estimator . fit ( X , y ) is estimator ) )
check if self is returned when calling fit .