'Interpolate the function.
Parameters
x : 1D array
x-coordinates of the mesh on which to interpolate.
y : 1D array
y-coordinates of the mesh on which to interpolate.
dx : int >= 0, < kx
Order of partial derivatives in x.
dy : int >= 0, < ky
Order of partial derivatives in y.
assume_sorted : bool, optional
If False, values of `x` and `y` can be in any order and they are
sorted first.
If True, `x` and `y` have to be arrays of monotonically
increasing values.
Returns
z : 2D array with shape (len(y), len(x))
The interpolated values.'

def __call__(self, x, y, dx=0, dy=0, assume_sorted=False):

    x = atleast_1d(x)
    y = atleast_1d(y)
    if ((x.ndim != 1) or (y.ndim != 1)):
        raise ValueError('x    and    y    should    both    be    1-D    arrays')
    if (not assume_sorted):
        x = np.sort(x)
        y = np.sort(y)
    if (self.bounds_error or (self.fill_value is not None)):
        out_of_bounds_x = ((x < self.x_min) | (x > self.x_max))
        out_of_bounds_y = ((y < self.y_min) | (y > self.y_max))
        any_out_of_bounds_x = np.any(out_of_bounds_x)
        any_out_of_bounds_y = np.any(out_of_bounds_y)
    if (self.bounds_error and (any_out_of_bounds_x or any_out_of_bounds_y)):
        raise ValueError(('Values    out    of    range;    x    must    be    in    %r,    y    in    %r' % ((self.x_min, self.x_max), (self.y_min, self.y_max))))
    z = fitpack.bisplev(x, y, self.tck, dx, dy)
    z = atleast_2d(z)
    z = transpose(z)
    if (self.fill_value is not None):
        if any_out_of_bounds_x:
            z[:, out_of_bounds_x] = self.fill_value
        if any_out_of_bounds_y:
            z[out_of_bounds_y, :] = self.fill_value
    if (len(z) == 1):
        z = z[0]
    return array(z)
