mr2.utils.interp
- mr2.utils.interp(x: Tensor, xp: Tensor, fp: Tensor) Tensor[source]
One-dimensional linear interpolation for monotonically increasing sample points.
Implements numpy.interp
Evaluates the function at the given coordinates x based on the known points (xp, fp). Out-of-bounds values are clamped to fp[0] and fp[-1], matching the default behavior of numpy.interp.
- Parameters:
- Returns:
The interpolated values matching the shape of x.