bundles / scipy 1.17.1 / scipy / interpolate / _fitpack_py / splev
function
scipy.interpolate._fitpack_py:splev
Signature
def splev ( x , tck , der = 0 , ext = 0 ) Summary
Evaluate a B-spline or its derivatives.
Extended Summary
Given the knots and coefficients of a B-spline representation, evaluate the value of the smoothing polynomial and its derivatives. This is a wrapper around the FORTRAN routines splev and splder of FITPACK.
Parameters
x: array_likeAn array of points at which to return the value of the smoothed spline or its derivatives. If
tckwas returned fromsplprep, then the parameter values, u should be given.tck: BSpline instance or tupleIf a tuple, then it should be a sequence of length 3 returned by
splreporsplprepcontaining the knots, coefficients, and degree of the spline. (Also see Notes.)der: int, optionalThe order of derivative of the spline to compute (must be less than or equal to k, the degree of the spline).
ext: int, optionalControls the value returned for elements of
xnot in the interval defined by the knot sequence.if ext=0, return the extrapolated value.
if ext=1, return 0
if ext=2, raise a ValueError
if ext=3, return the boundary value.
The default value is 0.
Returns
y: ndarray or list of ndarraysAn array of values representing the spline function evaluated at the points in
x. Iftckwas returned fromsplprep, then this is a list of arrays representing the curve in an N-D space.
Notes
Manipulating the tck-tuples directly is not recommended. In new code, prefer using BSpline objects.
Array API Standard Support
splev is not in-scope for support of Python Array API Standard compatible backends other than NumPy.
See dev-arrayapi for more information.
Examples
Examples are given :ref:`in the tutorial <tutorial-interpolate_splXXX>`. A comparison between `splev`, `splder` and `spalde` to compute the derivatives of a B-spline can be found in the `spalde` examples section.See also
Aliases
-
scipy.interpolate.splev