

def test_index_slice_fanout():
    A = npr.randn(5, 6, 4)

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

dataset/ETHPy150Open HIPS/autograd/tests/test_numpy.py test_index_slice_fanout/VarMisuse@91/102 `x`->`d_fun`