

def test_r_slicing():
    with warnings.catch_warnings(record=True) as w:
        c = npr.randn(10)

        def fun(x):
            b = np.r_[x, c, 1:10]
            return to_scalar(b)
        A = npr.randn(10)
        d_fun = (lambda x: to_scalar(grad(fun)(x)))
        check_grads(fun, A)
        check_grads(d_fun, x)

dataset/ETHPy150Open HIPS/autograd/tests/test_numpy.py test_r_slicing/VarMisuse@101/119 `A`->`x`