class_docstr: This is the basic field structure,
       which contains the weighted graph structure
       plus an array of data (the 'field')
  field is an array of size(n, p)
        where n is the number of vertices of the graph
        and p is the field dimension
class_docstr_tok: ["This","is","the","basic","field","structure",",","which","contains","the","weighted","graph","structure","plus","an","array","of","data","(","the","'field","'",")","field","is","an","array","of","size","(","n",",","p",")","where","n","is","the","number","of","vertices","of","the","graph","and","p","is","the","field","dimension"]
docstr: Look for the local maxima of one dimension (refdim) of self.field
  
  Parameters
  ----------
  refdim (int) the field dimension over which the maxima are looked after
  th = float, optional
      threshold so that only values above th are considered
  
  Returns
  -------
  idx: array of shape (nmax)
       indices of the vertices that are local maxima
  depth: array of shape (nmax)
         topological depth of the local maxima :
         depth[idx[i]] = q means that idx[i] is a q-order maximum
docstr_tok: ["Look","for","the","local","maxima","of","one","dimension","(","refdim",")","of","self.field","Parameters","--","--","--","--","--","refdim","(","int",")","the","field","dimension","over","which","the","maxima","are","looked","after","th","=","float",",","optional","threshold","so","that","only","values","above","th","are","considered","Returns","--","--","--","-","idx",":","array","of","shape","(","nmax",")","indices","of","the","vertices","that","are","local","maxima","depth",":","array","of","shape","(","nmax",")","topological","depth","of","the","local","maxima",":","depth","[","idx","[","i","]","]","=","q","means","that","idx","[","i","]","is","a","q-order","maximum"]
code: def get_local_maxima(self, refdim=0, th=NEGINF):
      """
      Look for the local maxima of one dimension (refdim) of self.field
  
      Parameters
      ----------
      refdim (int) the field dimension over which the maxima are looked after
      th = float, optional
          threshold so that only values above th are considered
  
      Returns
      -------
      idx: array of shape (nmax)
           indices of the vertices that are local maxima
      depth: array of shape (nmax)
             topological depth of the local maxima :
             depth[idx[i]] = q means that idx[i] is a q-order maximum
      """
      depth_all = self.local_maxima(refdim, th)
      idx = np.ravel(np.where(depth_all))
      depth = depth_all[idx]
      return idx, depth
  
imports: from warnings import warn
  import numpy
  from .graph import Graph, WeightedGraph
label_desc: Use image node_id 9 for calling the Field obj's underlying member method code with example usage: obj.get_local_maxima(refdim, th) and returns: idx,  depth