

@ignore_warnings
def check_1d_input(name, X, X_2d, y):
    ForestEstimator = FOREST_ESTIMATORS[name]
    assert_raises(ValueError, ForestEstimator(n_estimators=1, random_state=0).fit, X, y)
    est = ForestEstimator(random_state=0)
    est.fit(X_2d, y)
    if ((name in FOREST_CLASSIFIERS) or (name in FOREST_REGRESSORS)):
        assert_raises(ValueError, name.predict, X)

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/ensemble/tests/test_forest.py check_1d_input/VarMisuse@87/128 `est`->`name`