scipy.interpolate.BarycentricInterpolator.

derivatives#

BarycentricInterpolator.derivatives(x, der=None)[source]#

在点 x 处计算多项式的几个导数

生成一个在点 x 处计算的导数数组。

参数:
xarray_like

评估导数的点

derint 或 list 或 None,可选

要评估多少个导数,或者对于所有可能的非零导数(即,等于点数的数字)为 None,或者要评估的导数列表。这个数字包括作为“第 0 个”导数的函数值。

返回值:
dndarray

具有导数的数组;d[j] 包含第 j 个导数。d[j] 的形状由用 x 的形状替换原始数组中的插值轴来确定。

示例

>>> from scipy.interpolate import KroghInterpolator
>>> KroghInterpolator([0,0,0],[1,2,3]).derivatives(0)
array([1.0,2.0,3.0])
>>> KroghInterpolator([0,0,0],[1,2,3]).derivatives([0,0])
array([[1.0,1.0],
       [2.0,2.0],
       [3.0,3.0]])