scipy.interpolate.InterpolatedUnivariateSpline.

导数#

InterpolatedUnivariateSpline.derivatives(x)[source]#

返回样条在点 x 处的所有导数。

参数:
xfloat

要评估导数的点。

返回值:
derndarray, shape(k+1,)

0 到 k 阶导数。

示例

>>> import numpy as np
>>> from scipy.interpolate import UnivariateSpline
>>> x = np.linspace(0, 3, 11)
>>> y = x**2
>>> spl = UnivariateSpline(x, y)
>>> spl.derivatives(1.5)
array([2.25, 3.0, 2.0, 0])