cupy.interp#
- cupy.interp(x, xp, fp, left=None, right=None, period=None)[source]#
One-dimensional linear interpolation.
- Parameters:
x (cupy.ndarray) – a 1D array of points on which the interpolation is performed.
xp (cupy.ndarray) – a 1D array of points on which the function values (
fp) are known.fp (cupy.ndarray) – a 1D array containing the function values at the the points
xp.left (float or complex) – value to return if
x < xp[0]. Default isfp[0].right (float or complex) – value to return if
x > xp[-1]. Default isfp[-1].period (None or float) – a period for the x-coordinates. Parameters
leftandrightare ignored ifperiodis specified. Default isNone.
- Returns:
The interpolated values, same shape as
x.- Return type:
Note
This function may synchronize if
leftorrightis not already on the device.See also