

def test_extract_patches_square():
    face = downsampled_face
    (i_h, i_w) = face.shape
    p = 8
    expected_n_patches = (((i_h - p) + 1), ((i_w - p) + 1))
    patches = extract_patches(face, patch_shape=p)
    assert_true((patches.shape == (expected_n_patches[0], expected_n_patches[1], p, p)))

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