MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/matplotlib/tri/_triinterpolate.py:33–56  ·  view source on GitHub ↗
(self, triangulation, z, trifinder=None)

Source from the content-addressed store, hash-verified

31 """
32
33 def __init__(self, triangulation, z, trifinder=None):
34 _api.check_isinstance(Triangulation, triangulation=triangulation)
35 self._triangulation = triangulation
36
37 self._z = np.asarray(z)
38 if self._z.shape != self._triangulation.x.shape:
39 raise ValueError("z array must have same length as triangulation x"
40 " and y arrays")
41
42 _api.check_isinstance((TriFinder, None), trifinder=trifinder)
43 self._trifinder = trifinder or self._triangulation.get_trifinder()
44
45 # Default scaling factors : 1.0 (= no scaling)
46 # Scaling may be used for interpolations for which the order of
47 # magnitude of x, y has an impact on the interpolant definition.
48 # Please refer to :meth:`_interpolate_multikeys` for details.
49 self._unit_x = 1.0
50 self._unit_y = 1.0
51
52 # Default triangle renumbering: None (= no renumbering)
53 # Renumbering may be used to avoid unnecessary computations
54 # if complex calculations are done inside the Interpolator.
55 # Please refer to :meth:`_interpolate_multikeys` for details.
56 self._tri_renum = None
57
58 # __call__ and gradient docstrings are shared by all subclasses
59 # (except, if needed, relevant additions).

Callers

nothing calls this directly

Calls 1

get_trifinderMethod · 0.80

Tested by

no test coverage detected