

def test_index_dot_slices():
    A = npr.randn(4)

    def fun(x):
        return np.dot(x[:2], x[2:])
    d_fun = (lambda x: to_scalar(grad(fun)(x)))
    check_grads(fun, A)
    check_grads(A, A)

dataset/ETHPy150Open HIPS/autograd/tests/test_numpy.py test_index_dot_slices/VarMisuse@73/84 `d_fun`->`A`