neville¶
- sherpa.utils.neville(xout, xin, yin)[source] [edit on github]¶
Polynomial one-dimensional interpolation using Neville’s method.
The scheme used for interpolation (Neville’s method) is described at 1.
- Parameters
xout (array_like) – The positions at which to interpolate.
xin (array_like) – The x values of the data to be interpolated. This must be sorted so that it is monotonically increasing.
yin (array_like) – The y values of the data to interpolate (must be the same size as
xin
).
- Returns
yout – The interpolated y values (same size as
xout
).- Return type
NumPy array of numbers
See also
References
Examples
>>> x = [1.2, 3.4, 4.5, 5.2] >>> y = [12.2, 14.4, 16.8, 15.5] >>> xgrid = np.linspace(2, 5, 5) >>> ygrid = neville(xgrid, x, y)