def _evalOrDer(self, x, _eval, _Der):
    '\n        Returns the level and/or first derivative of the function at each value in\n        x.  Only called internally by HARKinterpolator1D.eval_and_der (etc).\n\n        Parameters\n        ----------\n        x_list : scalar or np.array\n            Set of points where we want to evlauate the interpolated function and/or its derivative..\n        _eval : boolean\n            Indicator for whether to evalute the level of the interpolated function.\n        _Der : boolean\n            Indicator for whether to evaluate the derivative of the interpolated function.\n\n        Returns\n        -------\n        A list including the level and/or derivative of the interpolated function where requested.\n        '
    i = np.maximum(np.searchsorted(self.x_list[:(- 1)], x), 1)
    alpha = ((x - self.x_list[(i - 1)]) / (self.x_list[i] - self.x_list[(i - 1)]))
    if _eval:
        y = (((1.0 - alpha) * self.y_list[(i - 1)]) + (alpha * self.y_list[i]))
    if _Der:
        dydx = ((self.y_list[i] - self.y_list[(i - 1)]) / (self.x_list[i] - self.x_list[(i - 1)]))
    if (not self.lower_extrap):
        below_lower_bound = (x < self.x_list[0])
        if _eval:
            y[below_lower_bound] = np.nan
        if _Der:
            dydx[below_lower_bound] = np.nan
    if self.decay_extrap:
        above_upper_bound = (x > self.x_list[(- 1)])
        x_temp = (x[above_upper_bound] - self.x_list[(- 1)])
        if _eval:
            y[above_upper_bound] = ((self.intercept_limit + (self.slope_limit * x[above_upper_bound])) - (self.decay_extrap_A * np.exp(((- self.decay_extrap_B) * x_temp))))
        if _Der:
            dydx[above_upper_bound] = (self.slope_limit + ((self.decay_extrap_B * self.decay_extrap_A) * np.exp(((- self.decay_extrap_B) * x_temp))))
    output = []
    if _eval:
        output += [y]
    if _Der:
        output += [dydx]
    return output
Returns the level and/or first derivative of the function at each value in
x.  Only called internally by HARKinterpolator1D.eval_and_der (etc).

Parameters
----------
x_list : scalar or np.array
    Set of points where we want to evlauate the interpolated function and/or its derivative..
_eval : boolean
    Indicator for whether to evalute the level of the interpolated function.
_Der : boolean
    Indicator for whether to evaluate the derivative of the interpolated function.

Returns
-------
A list including the level and/or derivative of the interpolated function where requested.
def _evalOrDer(self, x, _eval, _Der):
    '\n        Returns the level and/or first derivative of the function at each value in\n        x.  Only called internally by HARKinterpolator1D.eval_and_der (etc).\n\n        Parameters\n        ----------\n        x_list : scalar or np.array\n            Set of points where we want to evlauate the interpolated function and/or its derivative..\n        _eval : boolean\n            Indicator for whether to evalute the level of the interpolated function.\n        _Der : boolean\n            Indicator for whether to evaluate the derivative of the interpolated function.\n\n        Returns\n        -------\n        A list including the level and/or derivative of the interpolated function where requested.\n        '
    i = np.maximum(np.searchsorted(self.x_list[:(- 1)], x), 1)
    alpha = ((x - self.x_list[(i - 1)]) / (self.x_list[i] - self.x_list[(i - 1)]))
    if _eval:
        y = (((1.0 - alpha) * self.y_list[(i - 1)]) + (alpha * self.y_list[i]))
    if _Der:
        dydx = ((self.y_list[i] - self.y_list[(i - 1)]) / (self.x_list[i] - self.x_list[(i - 1)]))
    if (not self.lower_extrap):
        below_lower_bound = (x < self.x_list[0])
        if _eval:
            y[below_lower_bound] = np.nan
        if _Der:
            dydx[below_lower_bound] = np.nan
    if self.decay_extrap:
        above_upper_bound = (x > self.x_list[(- 1)])
        x_temp = (x[above_upper_bound] - self.x_list[(- 1)])
        if _eval:
            y[above_upper_bound] = ((self.intercept_limit + (self.slope_limit * x[above_upper_bound])) - (self.decay_extrap_A * np.exp(((- self.decay_extrap_B) * x_temp))))
        if _Der:
            dydx[above_upper_bound] = (self.slope_limit + ((self.decay_extrap_B * self.decay_extrap_A) * np.exp(((- self.decay_extrap_B) * x_temp))))
    output = []
    if _eval:
        output += [y]
    if _Der:
        output += [dydx]
    return output