

def check_memory_layout(name, dtype):
    est = FOREST_ESTIMATORS[name](random_state=0, bootstrap=False)
    X = np.asarray(iris.data, dtype=dtype)
    y = iris.target
    assert_array_equal(est.fit(X, y).predict(X), y)
    X = np.asarray(iris.data, order='C', dtype=dtype)
    y = iris.target
    assert_array_equal(est.fit(X, y).predict(X), y)
    X = np.asarray(iris.data, order='F', dtype=dtype)
    y = iris.target
    assert_array_equal(est.fit(X, y).predict(X), y)
    X = np.ascontiguousarray(iris.data, dtype=dtype)
    y = iris.target
    assert_array_equal(est.fit(X, y).predict(X), y)
    if (est.base_estimator.splitter in SPARSE_SPLITTERS):
        X = csr_matrix(iris.data, dtype=dtype)
        y = iris.target
        assert_array_equal(est.fit(X, y).predict(X), y)
        X = csc_matrix(iris.data, dtype=dtype)
        y = iris.target
        assert_array_equal(X.fit(X, y).predict(X), y)
        X = coo_matrix(iris.data, dtype=dtype)
        y = iris.target
        assert_array_equal(est.fit(X, y).predict(X), y)
    X = np.asarray(iris.data[::3], dtype=dtype)
    y = iris.target[::3]
    assert_array_equal(est.fit(X, y).predict(X), y)

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/ensemble/tests/test_forest.py check_memory_layout/VarMisuse@268/308 `est`->`X`