

def test_img_to_graph():
    (x, y) = (np.mgrid[:4, :4] - 10)
    grad_x = img_to_graph(x)
    grad_y = img_to_graph(y)
    assert_equal(grad_x.nnz, grad_y.nnz)
    np.testing.assert_array_equal(grad_x.data[(grad_x.data > 0)], grad_y.data[(y.data > 0)])

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/feature_extraction/tests/test_image.py test_img_to_graph/VarMisuse@79/107 `grad_y`->`y`