docstr: get graphical distance between function y=f(x) and a dataset
  
  Inputs:
    data: a mystic.math.legacydata.dataset of i points, M inputs, N outputs
    hausdorff: if True, use Hausdorff norm
  
  Additional Inputs:
    method: string for kind of interpolator
    maxpts: int, maximum number of points (x,z) to use from the monitor
    noise: float, amplitude of gaussian noise to remove duplicate x
    extrap: if True, extrapolate a bounding box (can reduce # of nans)
    arrays: if True, return a numpy array; otherwise don't return arrays
    axis: int in [0,N], index of z on which to interpolate (all, by default)
  
  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').
  
  NOTE:
    data and function may provide tuple-valued or single-valued output.
    Distance will be measured component-wise, resulting in a tuple of
    distances, unless an 'axis' is selected. If an axis is selected,
    then return distance for the selected component (i.e. axis) only.
      
docstr_tok: ["get","graphical","distance","between","function","y=f","(","x",")","and","a","dataset","Inputs",":","data",":","a","mystic.math.legacydata.dataset","of","i","points",",","M","inputs",",","N","outputs","hausdorff",":","if","True",",","use","Hausdorff","norm","Additional","Inputs",":","method",":","string","for","kind","of","interpolator","maxpts",":","int",",","maximum","number","of","points","(","x",",","z",")","to","use","from","the","monitor","noise",":","float",",","amplitude","of","gaussian","noise","to","remove","duplicate","x","extrap",":","if","True",",","extrapolate","a","bounding","box","(","can","reduce","#","of","nans",")","arrays",":","if","True",",","return","a","numpy","array",";","otherwise","do","n't","return","arrays","axis",":","int","in","[","0",",","N","]",",","index","of","z","on","which","to","interpolate","(","all",",","by","default",")","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","'",")",".","NOTE",":","data","and","function","may","provide","tuple-valued","or","single-valued","output",".","Distance","will","be","measured","component-wise",",","resulting","in","a","tuple","of","distances",",","unless","an","'axis","'","is","selected",".","If","an","axis","is","selected",",","then","return","distance","for","the","selected","component","(","i.e",".","axis",")","only","."]
code: def distance(self, data, axis=None, **kwds):
      """get graphical distance between function y=f(x) and a dataset
  
      Inputs:
        data: a mystic.math.legacydata.dataset of i points, M inputs, N outputs
        hausdorff: if True, use Hausdorff norm
  
      Additional Inputs:
        method: string for kind of interpolator
        maxpts: int, maximum number of points (x,z) to use from the monitor
        noise: float, amplitude of gaussian noise to remove duplicate x
        extrap: if True, extrapolate a bounding box (can reduce # of nans)
        arrays: if True, return a numpy array; otherwise don't return arrays
        axis: int in [0,N], index of z on which to interpolate (all, by default)
  
      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').
  
      NOTE:
        data and function may provide tuple-valued or single-valued output.
        Distance will be measured component-wise, resulting in a tuple of
        distances, unless an 'axis' is selected. If an axis is selected,
        then return distance for the selected component (i.e. axis) only.
      """
      import dataset as ds
  
      return ds.distance(data, self.__func__, axis=axis, **kwds)
  
label_desc: Use image node_id 7 for calling the OUQModel obj's underlying member method code with example usage: obj.distance(data, axis) and returns: ds