scipy.interpolate.BarycentricInterpolator.derivatives#
- BarycentricInterpolator.derivatives(x, der=None)[source]#
Evaluate several derivatives of the polynomial at the point x
Produce an array of derivatives evaluated at the point x.
- Parameters:
- xarray_like
Point or points at which to evaluate the derivatives
- derint or list or None, optional
How many derivatives to evaluate, or None for all potentially nonzero derivatives (that is, a number equal to the number of points), or a list of derivatives to evaluate. This number includes the function value as the ‘0th’ derivative.
- Returns:
- dndarray
Array with derivatives;
d[j]
contains the jth derivative. Shape ofd[j]
is determined by replacing the interpolation axis in the original array with the shape of x.
Examples
>>> 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]])