

def test_prod_2():

    def fun(x):
        return to_scalar(np.prod(x, axis=0))
    d_fun = (lambda x: to_scalar(grad(fun)(x)))
    mat = ((npr.randn(2, 3) ** 2) + 0.1)
    check_grads(fun, mat)
    check_grads(d_fun, mat)

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