def test_prod_1():
    def fun(x): return to_scalar(np.prod(x))
    d_fun = lambda x : to_scalar(grad(fun)(x))
    mat = npr.randn(2, 3)**2 / 10.0 + 0.1  # Gradient unstable when zeros are present.
    check_grads(fun, mat)
    check_grads(d_fun, mat)
dataset/ETHPy150Open HIPS/autograd/tests/test_numpy.py/test_prod_1/original