-
iwopy.utils.RegularDiscretizationGrid.interpolation_coeffs_points(pts, ret_pmap=
False
)[source] Get the interpolation coefficients for a set of points.
Example¶
>>> g = RegularDiscretizationGrid(...) >>> pts = ... >>> gpts, c = g.interpolation_coeffs_points(pts) >>> ratg = ... calc results at gpts, shape (n_gpts, x) ... >>> ires = np.einsum('gx,pg->px', ratg, c)
Parameters¶
- pts: numpy.ndarray
The points, shape: (n_pts, n_dims)
- ret_pmap: bool
Additionally return the map from pts to gpts
Returns¶
- gpts: numpy.ndarray
The grid points relevant for coeffs, shape: (n_gpts, n_dims)
- coeffs: numpy.ndarray
The interpolation coefficients, shape: (n_pts, n_gpts)
- pmap: numpy.ndarray, optional
The map from pts to gpts, shape: (n_pts, n_gp)