

def test_index_multiple_slices():
    A = npr.randn(7)

    def fun(x):
        y = x[2:6]
        z = y[1:3]
        return to_scalar(z)
    d_fun = (lambda x: to_scalar(grad(fun)(x)))
    check_grads(fun, A)
    check_grads(d_fun, A)

dataset/ETHPy150Open HIPS/autograd/tests/test_numpy.py test_index_multiple_slices/original