bundles / scipy 1.17.1 / scipy / interpolate / _dierckx / find_interval
built-in
scipy.interpolate._dierckx:find_interval
Summary
Find an interval such that t[interval] <= xval < t[interval+1].
Extended Summary
Uses a linear search with locality, see fitpack's splev.
Parameters
t: ndarray, shape (nt,)Knots
k: intB-spline degree
xval: doublevalue to find the interval for
prev_l: intinterval where the previous value was located. if unknown, use any value < k to start the search.
extrapolate: intwhether to return the last or the first interval if xval is out of bounds.
Returns
interval: intSuitable interval or -1 if xval was nan.
Aliases
-
scipy.interpolate._dierckx.find_interval