

def test_median_strategy_regressor():
    random_state = np.random.RandomState(seed=1)
    X = ([[0]] * 5)
    y = random_state.randn(5)
    reg = DummyRegressor(strategy='median')
    reg.fit(X, y)
    assert_array_equal(reg.predict(X), ([np.median(y)] * len(X)))

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