def test_sobel_h_vertical():
 (i, j) = np.mgrid[(-5):6, (-5):6]
 image = ((j >= 0).astype(float) * np.sqrt(2))
 result = filters.sobel_h(image)
 assert_allclose(result, 0, atol=1e-10)

def test_sobel_h_vertical ( ) : ( i , j ) = np . mgrid [ ( - 5 ) : 6 , ( - 5 ) : 6 ] image = ( ( j >= 0 ) . astype ( float ) * np . sqrt ( 2 ) ) result = filters . sobel_h ( image ) assert_allclose ( result , 0 , atol = 1e-10 )
horizontal sobel on a vertical edge should be zero .