def __init__(self, x_list, y_list, dydx_list, intercept_limit=None, slope_limit=None, lower_extrap=False):
    "\n        The interpolation constructor to make a new cubic spline interpolation.\n\n        Parameters\n        ----------\n        x_list : np.array\n            List of x values composing the grid.\n        y_list : np.array\n            List of y values, representing f(x) at the points in x_list.\n        dydx_list : np.array\n            List of dydx values, representing f'(x) at the points in x_list\n        intercept_limit : float\n            Intercept of limiting linear function.\n        slope_limit : float\n            Slope of limiting linear function.\n        lower_extrap : boolean\n            Indicator for whether lower extrapolation is allowed.  False means\n            f(x) = NaN for x < min(x_list); True means linear extrapolation.\n\n        Returns\n        -------\n        new instance of CubicInterp\n\n        NOTE: When no input is given for the limiting linear function, linear\n        extrapolation is used above the highest gridpoint.\n        "
    self.x_list = np.asarray(x_list)
    self.y_list = np.asarray(y_list)
    self.dydx_list = np.asarray(dydx_list)
    self.n = len(x_list)
    if lower_extrap:
        self.coeffs = [[y_list[0], dydx_list[0], 0, 0]]
    else:
        self.coeffs = [[np.nan, np.nan, np.nan, np.nan]]
    for i in range((self.n - 1)):
        x0 = x_list[i]
        y0 = y_list[i]
        x1 = x_list[(i + 1)]
        y1 = y_list[(i + 1)]
        Span = (x1 - x0)
        dydx0 = (dydx_list[i] * Span)
        dydx1 = (dydx_list[(i + 1)] * Span)
        temp = [y0, dydx0, (((3 * (y1 - y0)) - (2 * dydx0)) - dydx1), (((2 * (y0 - y1)) + dydx0) + dydx1)]
        self.coeffs.append(temp)
    if ((slope_limit is None) and (intercept_limit is None)):
        slope_limit = dydx_list[(- 1)]
        intercept_limit = (y_list[(- 1)] - (slope_limit * x_list[(- 1)]))
    gap = (((slope_limit * x1) + intercept_limit) - y1)
    slope = (slope_limit - dydx_list[(self.n - 1)])
    if ((gap != 0) and (slope <= 0)):
        temp = [intercept_limit, slope_limit, gap, (slope / gap)]
    elif (slope > 0):
        temp = [intercept_limit, slope_limit, 0, 0]
    else:
        temp = [intercept_limit, slope_limit, gap, 0]
    self.coeffs.append(temp)
    self.coeffs = np.array(self.coeffs)
The interpolation constructor to make a new cubic spline interpolation.

Parameters
----------
x_list : np.array
    List of x values composing the grid.
y_list : np.array
    List of y values, representing f(x) at the points in x_list.
dydx_list : np.array
    List of dydx values, representing f'(x) at the points in x_list
intercept_limit : float
    Intercept of limiting linear function.
slope_limit : float
    Slope of limiting linear function.
lower_extrap : boolean
    Indicator for whether lower extrapolation is allowed.  False means
    f(x) = NaN for x < min(x_list); True means linear extrapolation.

Returns
-------
new instance of CubicInterp

NOTE: When no input is given for the limiting linear function, linear
extrapolation is used above the highest gridpoint.
def __init__(self, x_list, y_list, dydx_list, intercept_limit=None, slope_limit=None, lower_extrap=False):
    "\n        The interpolation constructor to make a new cubic spline interpolation.\n\n        Parameters\n        ----------\n        x_list : np.array\n            List of x values composing the grid.\n        y_list : np.array\n            List of y values, representing f(x) at the points in x_list.\n        dydx_list : np.array\n            List of dydx values, representing f'(x) at the points in x_list\n        intercept_limit : float\n            Intercept of limiting linear function.\n        slope_limit : float\n            Slope of limiting linear function.\n        lower_extrap : boolean\n            Indicator for whether lower extrapolation is allowed.  False means\n            f(x) = NaN for x < min(x_list); True means linear extrapolation.\n\n        Returns\n        -------\n        new instance of CubicInterp\n\n        NOTE: When no input is given for the limiting linear function, linear\n        extrapolation is used above the highest gridpoint.\n        "
    self.x_list = np.asarray(x_list)
    self.y_list = np.asarray(y_list)
    self.dydx_list = np.asarray(dydx_list)
    self.n = len(x_list)
    if lower_extrap:
        self.coeffs = [[y_list[0], dydx_list[0], 0, 0]]
    else:
        self.coeffs = [[np.nan, np.nan, np.nan, np.nan]]
    for i in range((self.n - 1)):
        x0 = x_list[i]
        y0 = y_list[i]
        x1 = x_list[(i + 1)]
        y1 = y_list[(i + 1)]
        Span = (x1 - x0)
        dydx0 = (dydx_list[i] * Span)
        dydx1 = (dydx_list[(i + 1)] * Span)
        temp = [y0, dydx0, (((3 * (y1 - y0)) - (2 * dydx0)) - dydx1), (((2 * (y0 - y1)) + dydx0) + dydx1)]
        self.coeffs.append(temp)
    if ((slope_limit is None) and (intercept_limit is None)):
        slope_limit = dydx_list[(- 1)]
        intercept_limit = (y_list[(- 1)] - (slope_limit * x_list[(- 1)]))
    gap = (((slope_limit * x1) + intercept_limit) - y1)
    slope = (slope_limit - dydx_list[(self.n - 1)])
    if ((gap != 0) and (slope <= 0)):
        temp = [intercept_limit, slope_limit, gap, (slope / gap)]
    elif (slope > 0):
        temp = [intercept_limit, slope_limit, 0, 0]
    else:
        temp = [intercept_limit, slope_limit, gap, 0]
    self.coeffs.append(temp)
    self.coeffs = np.array(self.coeffs)