def test_scharr_v_vertical():
 (i, j) = np.mgrid[(-5):6, (-5):6]
 image = (j >= 0).astype(float)
 result = filters.scharr_v(image)
 j[(np.abs(i) == 5)] = 10000
 assert np.all((result[(j == 0)] == 1))
 assert np.all((result[(np.abs(j) > 1)] == 0))

def test_scharr_v_vertical ( ) : ( i , j ) = np . mgrid [ ( - 5 ) : 6 , ( - 5 ) : 6 ] image = ( j >= 0 ) . astype ( float ) result = filters . scharr_v ( image ) j [ ( np . abs ( i ) == 5 ) ] = 10000 assert np . all ( ( result [ ( j == 0 ) ] == 1 ) ) assert np . all ( ( result [ ( np . abs ( j ) > 1 ) ] == 0 ) )
vertical scharr on an edge should be a vertical line .