

def test_array_from_scalar():

    def fun(x):
        return to_scalar(np.array(x))
    d_fun = (lambda x: grad(fun)(x))
    check_grads(fun, 3.0)
    check_grads(d_fun, 3.0)

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