class_docstr: A tiny class to handle cartesian grids
class_docstr_tok: ["A","tiny","class","to","handle","cartesian","grids"]
docstr: set the limits of the grid and the number of bins
  
  Parameters
  ----------
  lim: list of len(2*self.dim),
       the limits of the grid as (xmin, xmax, ymin, ymax, ...)
  n_bins: list of len(self.dim), optional
       the number of bins in each direction
docstr_tok: ["set","the","limits","of","the","grid","and","the","number","of","bins","Parameters","--","--","--","--","--","lim",":","list","of","len","(","2","*","self.dim",")",",","the","limits","of","the","grid","as","(","xmin",",","xmax",",","ymin",",","ymax",",","...",")","n_bins",":","list","of","len","(","self.dim",")",",","optional","the","number","of","bins","in","each","direction"]
code: def set(self, lim, n_bins=10):
      """set the limits of the grid and the number of bins
  
      Parameters
      ----------
      lim: list of len(2*self.dim),
           the limits of the grid as (xmin, xmax, ymin, ymax, ...)
      n_bins: list of len(self.dim), optional
           the number of bins in each direction
      """
      if len(lim) == 2 * self.dim:
          self.lim = lim
      else:
          raise ValueError("Wrong dimension for grid definition")
      if np.size(n_bins) == self.dim:
          self.n_bins = np.ravel(np.array(n_bins))
      else:
          raise ValueError("Wrong dimension for grid definition")
  
imports: import numpy
  from scipy.linalg import eigvalsh
label_desc: Use image node_id 2 for calling the GridDescriptor obj's underlying member method code with example usage: obj.set(lim, n_bins) without return types