scipy.interpolate.KroghInterpolator.

derivatives#

KroghInterpolator.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]])