tidy3d.plugins.autograd.functions.interpn#
- class interpn[source]#
Bases:
Interpolate over a rectilinear grid in arbitrary dimensions.
This function mirrors the interface of scipy.interpolate.interpn but is differentiable with autograd.
- Parameters:
points (tuple[np.ndarray[np.float64], ...]) β The points defining the rectilinear grid in n dimensions.
values (np.ndarray[np.float64]) β The data values on the rectilinear grid.
xi (tuple[np.ndarray[np.float64], ...]) β The coordinates to sample the gridded data at.
method (InterpolationType = "linear") β The method of interpolation to perform. Supported are βlinearβ and βnearestβ.
- Returns:
The interpolated values.
- Return type:
np.ndarray[np.float64]
- Raises:
ValueError β If the interpolation method is not supported.
See also
Inherited Common Usage