def compare_mse(im1, im2):
 _assert_compatible(im1, im2)
 (im1, im2) = _as_floats(im1, im2)
 return np.mean(np.square((im1 - im2)), dtype=np.float64)

def compare_mse ( im1 , im2 ) : _assert_compatible ( im1 , im2 ) ( im1 , im2 ) = _as_floats ( im1 , im2 ) return np . mean ( np . square ( ( im1 - im2 ) ) , dtype = np . float64 )
compute the mean-squared error between two images .