

def test_reconstruct_patches_perfect():
    face = downsampled_face
    (p_h, p_w) = (16, 16)
    patches = extract_patches_2d(face, (p_h, p_w))
    face_reconstructed = reconstruct_from_patches_2d(patches, face.shape)
    np.testing.assert_array_almost_equal(face, face_reconstructed)

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