

def test_y_mean_attribute_regressor():
    X = ([[0]] * 5)
    y = [1, 2, 4, 6, 8]
    est = DummyRegressor(strategy='mean')
    est.fit(X, y)
    assert_equal(est.constant_, np.mean(y))

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/tests/test_dummy.py test_y_mean_attribute_regressor/original