我是 python 新手,我一直在尝试实现数值导数高阶函数,但我无法修改我的代码以获得所需的结果:
def deriv(f): return lambda x: ((f(x + h) - f(x)) / h)
但是当调用函数时我收到错误,我无法解释。
python math lambda higher-order-functions
higher-order-functions ×1
lambda ×1
math ×1
python ×1