

def test_sum_with_axis_tuple():

    def fun(x):
        return to_scalar(np.sum(x, axis=(1, 2)))
    d_fun = (lambda x: to_scalar(grad(fun)(x)))
    mat = npr.randn(10, 11, 7)
    check_grads(fun, mat)
    check_grads(d_fun, mat)

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