def _derY(self, x, y):
    '\n        Returns the derivative with respect to y of the interpolated function\n        at each value in x,y. Only called internally by HARKinterpolator2D.derivativeY.\n        '
    if _isscalar(x):
        y_pos = max(min(np.searchsorted(self.y_list, y), (self.y_n - 1)), 1)
        dfdy = ((self.xInterpolators[y_pos](x) - self.xInterpolators[(y_pos - 1)](x)) / (self.y_list[y_pos] - self.y_list[(y_pos - 1)]))
    else:
        m = len(x)
        y_pos = np.searchsorted(self.y_list, y)
        y_pos[(y_pos > (self.y_n - 1))] = (self.y_n - 1)
        y_pos[(y_pos < 1)] = 1
        dfdy = (np.zeros(m) + np.nan)
        if (y.size > 0):
            for i in range(1, self.y_n):
                c = (y_pos == i)
                if np.any(c):
                    dfdy[c] = ((self.xInterpolators[i](x[c]) - self.xInterpolators[(i - 1)](x[c])) / (self.y_list[i] - self.y_list[(i - 1)]))
    return dfdy
Returns the derivative with respect to y of the interpolated function
at each value in x,y. Only called internally by HARKinterpolator2D.derivativeY.
def _derY(self, x, y):
    '\n        Returns the derivative with respect to y of the interpolated function\n        at each value in x,y. Only called internally by HARKinterpolator2D.derivativeY.\n        '
    if _isscalar(x):
        y_pos = max(min(np.searchsorted(self.y_list, y), (self.y_n - 1)), 1)
        dfdy = ((self.xInterpolators[y_pos](x) - self.xInterpolators[(y_pos - 1)](x)) / (self.y_list[y_pos] - self.y_list[(y_pos - 1)]))
    else:
        m = len(x)
        y_pos = np.searchsorted(self.y_list, y)
        y_pos[(y_pos > (self.y_n - 1))] = (self.y_n - 1)
        y_pos[(y_pos < 1)] = 1
        dfdy = (np.zeros(m) + np.nan)
        if (y.size > 0):
            for i in range(1, self.y_n):
                c = (y_pos == i)
                if np.any(c):
                    dfdy[c] = ((self.xInterpolators[i](x[c]) - self.xInterpolators[(i - 1)](x[c])) / (self.y_list[i] - self.y_list[(i - 1)]))
    return dfdy