

def test_extract_patches_all():
    face = downsampled_face
    (i_h, i_w) = face.shape
    (p_h, p_w) = (16, 16)
    expected_n_patches = (((i_h - p_h) + 1) * ((i_w - p_w) + 1))
    patches = extract_patches_2d(face, (p_h, p_w))
    assert_equal(patches.shape, (expected_n_patches, p_h, p_w))

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/feature_extraction/tests/test_image.py test_extract_patches_all/original