class_docstr: Abstract base class for classes used to interpolate on a triangular grid.
  
  Derived classes implement the following methods:
  
  - ``__call__(x, y)``,
    where x, y are array-like point coordinates of the same shape, and
    that returns a masked array of the same shape containing the
    interpolated z-values.
  
  - ``gradient(x, y)``,
    where x, y are array-like point coordinates of the same
    shape, and that returns a list of 2 masked arrays of the same shape
    containing the 2 derivatives of the interpolator (derivatives of
    interpolated z values with respect to x and y).
class_docstr_tok: ["Abstract","base","class","for","classes","used","to","interpolate","on","a","triangular","grid",".","Derived","classes","implement","the","following","methods",":","-","``","__call__","(","x",",","y",")","``",",","where","x",",","y","are","array-like","point","coordinates","of","the","same","shape",",","and","that","returns","a","masked","array","of","the","same","shape","containing","the","interpolated","z-values",".","-","``","gradient","(","x",",","y",")","``",",","where","x",",","y","are","array-like","point","coordinates","of","the","same","shape",",","and","that","returns","a","list","of","2","masked","arrays","of","the","same","shape","containing","the","2","derivatives","of","the","interpolator","(","derivatives","of","interpolated","z","values","with","respect","to","x","and","y",")","."]
code: def __init__(self, triangulation, z, trifinder=None):
      _api.check_isinstance(Triangulation, triangulation=triangulation)
      self._triangulation = triangulation
  
      self._z = np.asarray(z)
      if self._z.shape != self._triangulation.x.shape:
          raise ValueError(
              "z array must have same length as triangulation x"
              " and y arrays"
          )
  
      _api.check_isinstance((TriFinder, None), trifinder=trifinder)
      self._trifinder = trifinder or self._triangulation.get_trifinder()
  
      # Default scaling factors : 1.0 (= no scaling)
      # Scaling may be used for interpolations for which the order of
      # magnitude of x, y has an impact on the interpolant definition.
      # Please refer to :meth:`_interpolate_multikeys` for details.
      self._unit_x = 1.0
      self._unit_y = 1.0
  
      # Default triangle renumbering: None (= no renumbering)
      # Renumbering may be used to avoid unnecessary computations
      # if complex calculations are done inside the Interpolator.
      # Please refer to :meth:`_interpolate_multikeys` for details.
      self._tri_renum = None
  
imports: import numpy
  from matplotlib import _api
  from matplotlib.tri import Triangulation
  from matplotlib.tri._trifinder import TriFinder
  from matplotlib.tri._tritools import TriAnalyzer
label_desc: Use image node_id 1 to create a new TriInterpolator object  with example: obj = TriInterpolator(triangulation, z, trifinder)