matplotlib 3.5.1

ParametersReturns
_interpolate_multikeys(self, x, y, tri_index=None, return_keys=('z',))

_interpolate_multikeys is a wrapper around method _interpolate_single_key (to be defined in the child subclasses). `_interpolate_single_key actually performs the interpolation, but only for 1-dimensional inputs and at valid locations (inside unmasked triangles of the triangulation).

The purpose of _interpolate_multikeys is to implement the following common tasks needed in all subclasses implementations:

(Note that np.vectorize could do most of those things very well for you, but it does it by function evaluations over successive tuples of the input arrays. Therefore, this tends to be more time consuming than using optimized numpy functions - e.g., np.dot - which can be used easily on the flattened inputs, in the child-subclass methods _interpolate_single_key .)

It is guaranteed that the calls to _interpolate_single_key will be done with flattened (1-d) array-like input parameters x, y and with flattened, valid :None:None:`tri_index` arrays (no -1 index allowed).

Parameters

x, y : array-like

x and y coordinates where interpolated values are requested.

tri_index : array-like of int, optional

Array of the containing triangle indices, same shape as x and y. Defaults to None. If None, these indices will be computed by a TriFinder instance. (Note: For point outside the grid, tri_index[ipt] shall be -1).

return_keys : tuple of keys from {'z', 'dzdx', 'dzdy'}

Defines the interpolation arrays to return, and in which order.

Returns

list of arrays

Each array-like contains the expected interpolated values in the order defined by return_keys parameter.

Versatile (private) method defined for all TriInterpolators.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/tri/triinterpolate.py#102
type: <class 'function'>
Commit: