scipy.interpolate.KroghInterpolator.derivatives

KroghInterpolator.derivatives(x, der=None)[源代码]

求多项式在点x处的多项式的导数

生成点x处的所有导数值的数组。

参数
xarray_like

对导数求值的一个或多个点

der整型或无型,可选

要提取多少个导数;对于所有潜在的非零导数(即等于点数的数字)都不提取。此数字包括作为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]])