Extrapolation¶
Method to extend interpolation objects to constantly / linearly extrapolate.
-
extrapolate_1d
(x, y, interpolation='linear', exterpolation='constant')[source]¶ Interpolate on given values and extrapolate outside the given data
Arguments
- xarray
x values of the data to interpolate.
- yarray
y values of the data to interpolate.
- interpolationstr
Optional interpolation metho. See
scipy.interpolate.interp1d()
. Default is ‘linear’.- exterpolation :
Optional interpolation method, either “linear” or “constant”.
Returns
- extrapolatorfunction
Inter- and extra-polation function.
-
extrapolate_from_interpolator_1d
(interpolator, exterpolation='constant')[source]¶ Extend interpolation function to extrapolate outside the given data
Arguments
- interpolatorfunction
Interpolating function, see e.g.
scipy.interpolate.interp1d()
.- exterpolationstr
Optional interpolation method, either “linear” or “constant”.
Returns
- extrapolatorfunction
Inter- and extra-polation function.