{ } Raw JSON

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 : int

B-spline degree

xval : double

value to find the interval for

prev_l : int

interval where the previous value was located. if unknown, use any value < k to start the search.

extrapolate : int

whether to return the last or the first interval if xval is out of bounds.

Returns

interval : int

Suitable interval or -1 if xval was nan.

Aliases

  • scipy.interpolate._dierckx.find_interval