

def test_clip():

    def fun(x):
        return to_scalar(np.clip(x, a_min=0.1, a_max=1.1))
    d_fun = (lambda x: to_scalar(grad(fun)(x)))
    mat = npr.randn(5, 5)
    check_grads(fun, mat)
    check_grads(mat, mat)

dataset/ETHPy150Open HIPS/autograd/tests/test_numpy.py test_clip/VarMisuse@76/88 `d_fun`->`mat`