RegularGridInterpolator.__call__(self, xi, method=None)
In the case that xi.ndim == 1
a new axis is inserted into the 0 position of the returned array, values_x, so its shape is instead (1,) + values.shape[ndim:]
.
The coordinates to evaluate the interpolator at.
The method of interpolation to perform. Supported are "linear", "nearest", "slinear", "cubic", "quintic" and "pchip". Default is the method chosen when the interpolator was created.
Interpolated values at xi. See notes for behaviour when xi.ndim == 1
.
Interpolation at coordinates.
import numpy as np
x, y = np.array([0, 1, 2]), np.array([1, 3, 7])
def f(x, y):
return x**2 + y**2
data = f(*np.meshgrid(x, y, indexing='ij', sparse=True))
from scipy.interpolate import RegularGridInterpolator
interp = RegularGridInterpolator((x, y), data, method='nearest')
interp([[1.5, 1.3], [0.3, 4.5]])
interp([[1.5, 1.3], [0.3, 4.5]], method='linear')
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