Package cosmolopy :: Module utils :: Class Extrapolate1d

Class Extrapolate1d

source code

Interpolate/Extrapolate 1d data.
Instance Methods
 
linear_coefficients(self, x=None, y=None, slope=None, match_index=0) source code
 
__init__(self, x, y, bounds_behavior=['extrapolate', 'extrapolate'], slopes=[None, None], npoints=[2, 2], **interpargs)
x, y:
source code
 
extrap_string(self) source code
 
__call__(self, x1) source code
Method Details

__init__(self, x, y, bounds_behavior=['extrapolate', 'extrapolate'], slopes=[None, None], npoints=[2, 2], **interpargs)
(Constructor)

source code 

x, y:

sequences of data. Will be sorted by x value before use.

bound_behavior:

length-2 sequence specifying behavior below the lower and above the upper boungs of the data, respectively. Each element can be 'extrapolate', 'constant', or a numerical value.

npoints:

Linear extrapolation uses the slope between x[0] and x[npoints-1] or x[-npoints] and x[-1]. Note: this is not a linear fit over that range. It Ignores points within the interval

interpargs:

Extra keywords passed to scipy.interpolate.interp1d.