

def test_multi_index2():
    A = npr.randn(3)
    fun = (lambda x: np.sum(fun[[0, 1, 0]]))
    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_multi_index2/VarMisuse@28/33 `x`->`fun`