

def test_patch_extractor_color():
    faces = _make_images(orange_face)
    (i_h, i_w) = faces.shape[1:3]
    (p_h, p_w) = (8, 8)
    expected_n_patches = ((len(faces) * ((i_h - p_h) + 1)) * ((i_w - p_w) + 1))
    extr = PatchExtractor(patch_size=(p_h, p_w), random_state=0)
    patches = extr.transform(faces)
    assert_true((patches.shape == (extr, p_h, p_w, 3)))

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/feature_extraction/tests/test_image.py test_patch_extractor_color/VarMisuse@108/146 `expected_n_patches`->`extr`