class_docstr: `~matplotlib.tri.TriFinder` class implemented using the trapezoid
  map algorithm from the book "Computational Geometry, Algorithms and
  Applications", second edition, by M. de Berg, M. van Kreveld, M. Overmars
  and O. Schwarzkopf.
  
  The triangulation must be valid, i.e. it must not have duplicate points,
  triangles formed from colinear points, or overlapping triangles.  The
  algorithm has some tolerance to triangles formed from colinear points, but
  this should not be relied upon.
class_docstr_tok: ["`","~matplotlib.tri.TriFinder","`","class","implemented","using","the","trapezoid","map","algorithm","from","the","book","``","Computational","Geometry",",","Algorithms","and","Applications","''",",","second","edition",",","by","M.","de","Berg",",","M.","van","Kreveld",",","M.","Overmars","and","O.","Schwarzkopf",".","The","triangulation","must","be","valid",",","i.e",".","it","must","not","have","duplicate","points",",","triangles","formed","from","colinear","points",",","or","overlapping","triangles",".","The","algorithm","has","some","tolerance","to","triangles","formed","from","colinear","points",",","but","this","should","not","be","relied","upon","."]
docstr: Return an array containing the indices of the triangles in which the
  specified *x*, *y* points lie, or -1 for points that do not lie within
  a triangle.
  
  *x*, *y* are array-like x and y coordinates of the same shape and any
  number of dimensions.
  
  Returns integer array with the same shape and *x* and *y*.
docstr_tok: ["Return","an","array","containing","the","indices","of","the","triangles","in","which","the","specified","*","x","*",",","*","y","*","points","lie",",","or","-1","for","points","that","do","not","lie","within","a","triangle",".","*","x","*",",","*","y","*","are","array-like","x","and","y","coordinates","of","the","same","shape","and","any","number","of","dimensions",".","Returns","integer","array","with","the","same","shape","and","*","x","*","and","*","y","*","."]
code: def __call__(self, x, y):
      """
      Return an array containing the indices of the triangles in which the
      specified *x*, *y* points lie, or -1 for points that do not lie within
      a triangle.
  
      *x*, *y* are array-like x and y coordinates of the same shape and any
      number of dimensions.
  
      Returns integer array with the same shape and *x* and *y*.
      """
      x = np.asarray(x, dtype=np.float64)
      y = np.asarray(y, dtype=np.float64)
      if x.shape != y.shape:
          raise ValueError(
              "x and y must be array-like with the same shape"
          )
  
      # C++ does the heavy lifting, and expects 1D arrays.
      indices = self._cpp_trifinder.find_many(
          x.ravel(), y.ravel()
      ).reshape(x.shape)
      return indices
  
file_path: matplotlib/lib/matplotlib/tri/_trifinder.py
imports: import numpy
  from matplotlib import _api
  from matplotlib.tri import Triangulation
label_desc: Use image node_id 2 for calling the TrapezoidMapTriFinder obj's underlying member method code with example usage: obj.__call__(x, y) and returns: indices