docstr: interpolate data (x,z) to generate response function z=f(*x)
  
  Input:
    maxpts: int, maximum number of points to use from (x,z)
    noise: float, amplitude of gaussian noise to remove duplicate x
    method: string for kind of interpolator
    extrap: if True, extrapolate a bounding box (can reduce # of nans)
    arrays: if True, return a numpy array; otherwise don't return arrays
  
  Output:
    interpolated response function, where z=f(*x.T)
  
  NOTE:
    if scipy is not installed, will use np.interp for 1D (non-rbf),
    or mystic's rbf otherwise. default method is 'nearest' for
    1D and 'linear' otherwise. method can be one of ('rbf','linear',
    'nearest','cubic','inverse','gaussian','quintic','thin_plate').
docstr_tok: ["interpolate","data","(","x",",","z",")","to","generate","response","function","z=f","(","*","x",")","Input",":","maxpts",":","int",",","maximum","number","of","points","to","use","from","(","x",",","z",")","noise",":","float",",","amplitude","of","gaussian","noise","to","remove","duplicate","x","method",":","string","for","kind","of","interpolator","extrap",":","if","True",",","extrapolate","a","bounding","box","(","can","reduce","#","of","nans",")","arrays",":","if","True",",","return","a","numpy","array",";","otherwise","do","n't","return","arrays","Output",":","interpolated","response","function",",","where","z=f","(","*","x.T",")","NOTE",":","if","scipy","is","not","installed",",","will","use","np.interp","for","1D","(","non-rbf",")",",","or","mystic","'s","rbf","otherwise",".","default","method","is","'nearest","'","for","1D","and","'linear","'","otherwise",".","method","can","be","one","of","(","'rbf","'",",","'linear","'",",","'nearest","'",",","'cubic","'",",","'inverse","'",",","'gaussian","'",",","'quintic","'",",","'thin_plate","'",")","."]
code: def Interpolate(
      self, **kwds
  ):  # XXX: refactor so use self.interpolator ?
      """interpolate data (x,z) to generate response function z=f(*x)
  
      Input:
        maxpts: int, maximum number of points to use from (x,z)
        noise: float, amplitude of gaussian noise to remove duplicate x
        method: string for kind of interpolator
        extrap: if True, extrapolate a bounding box (can reduce # of nans)
        arrays: if True, return a numpy array; otherwise don't return arrays
  
      Output:
        interpolated response function, where z=f(*x.T)
  
      NOTE:
        if scipy is not installed, will use np.interp for 1D (non-rbf),
        or mystic's rbf otherwise. default method is 'nearest' for
        1D and 'linear' otherwise. method can be one of ('rbf','linear',
        'nearest','cubic','inverse','gaussian','quintic','thin_plate').
      """
      from interpolator import Interpolator
  
      args = self.args.copy()
      args.update(kwds)
      maxpts, noise = self.maxpts, self.noise
      ii = Interpolator(
          self.x, self.z, maxpts=maxpts, noise=noise, **args
      )
      self.surrogate = ii.Interpolate(**args)
      # build the surrogate
      self.surrogate.__doc__ = self.objective.__doc__
      return self.surrogate
  
file_path: mystic/examples3/surface.py
label_desc: Use image node_id 5 for calling the Surface obj's underlying member method code with example usage: obj.Interpolate() and returns: self