def test_roberts_diagonal2():
 image = np.rot90(np.tri(10, 10, 0), 3)
 expected = (~ np.rot90((np.tri(10, 10, (-1)).astype(bool) | np.tri(10, 10, (-2)).astype(bool).transpose())))
 expected = _mask_filter_result(expected, None)
 result = filters.roberts(image).astype(bool)
 assert_close(result, expected)

def test_roberts_diagonal2 ( ) : image = np . rot90 ( np . tri ( 10 , 10 , 0 ) , 3 ) expected = ( ~ np . rot90 ( ( np . tri ( 10 , 10 , ( - 1 ) ) . astype ( bool ) | np . tri ( 10 , 10 , ( - 2 ) ) . astype ( bool ) . transpose ( ) ) ) ) expected = _mask_filter_result ( expected , None ) result = filters . roberts ( image ) . astype ( bool ) assert_close ( result , expected )
roberts filter on a diagonal edge should be a diagonal line .