code: def simple_nearest_indices(xs,res):
      '''
      Simple nearest interpolator that interpolates based on
      the minima and maxima of points based on the passed
      resolution in res.
  
      Parameters:
      -----------
  
      xs  -- A collection of `ndim` arrays of points.
      res -- List of resolutions.
      '''
      maxs = [max(a) for a in xs]
      mins = [min(a) for a in xs]
      XS = [np.linspace(mn, mx, r) for mn,mx,r in zip(mins,maxs,res)];
      XS = tuple(np.meshgrid(*XS,indexing='ij'));
      if type(xs) != tuple:
          xs = tuple(xs);
      return nearest_indices(xs,XS)f simple_nearest_indices(xs,res):
      '''
      Simple nearest interpolator that interpolates based on
      the minima and maxima of points based on the passed
      resolution in res.
  
      Parameters:
      -----------
  
      xs  -- A collection of `ndim` arrays of points.
      res -- List of resolutions.
      '''
      maxs = [max(a) for a in xs]
      mins = [min(a) for a in xs]
      XS = [np.linspace(mn, mx, r) for mn,mx,r in zip(mins,maxs,res)];
      XS = tuple(np.meshgrid(*XS,indexing='ij'));
      if type(xs) != tuple:
          xs = tuple(xs);
      return nearest_indices(xs,XS);
docs: Simple nearest interpolator that interpolates based on
      the minima and maxima of points based on the passed
      resolution in res.
  
      Parameters:
      -----------
  
      xs  -- A collection of `ndim` arrays of points.
      res -- List of resolutions.