cubic_spline¶
-
class
cubic_spline.
CubicSpline
(y, dx=None, rtransform=None, extrapolation=None)¶ A cubic spline object
- Parameters
y – The function values at the 1D grid.
dx (optional) – The derivative of the function values at the 1D grid. If not given, they are determined such that the second derivative of the cubic spline is continuous at the grid points.
rtransform (optional) – The transformation object that specifies the 1D grid. If not given, an identity transform is used
extrapolation (optional) – The extrapolation object that specifies the spline function outside the interval determined by the 1D grid. By default, CuspExtrapolation() is used.
-
deriv
(new_x, new_dx=None)¶ Evaluate the derivative of the spline (towards x) on a grid
- Parameters
new_x (ndarray) – A numpy array with the x-values at which the spline must be evaluated.
new_dx (ndarray, optional) – When given, it is used as output argument. This array must have the same size of new_x.
- Returns
new_dx