

def test_trace():

    def fun(x):
        return np.trace(x, offset=offset)
    d_fun = (lambda x: to_scalar(grad(fun)(x)))
    mat = npr.randn(10, 11)
    offset = npr.randint((- 9), 11)
    check_grads(fun, mat)
    check_grads(x, mat)

dataset/ETHPy150Open HIPS/autograd/tests/test_numpy.py test_trace/VarMisuse@83/93 `d_fun`->`x`