cupyx.scipy.fftpack.rfft#
- cupyx.scipy.fftpack.rfft(x, n=None, axis=-1, overwrite_x=False, plan=None)[source]#
Compute the one-dimensional FFT for real input.
The returned real array contains
[y(0),Re(y(1)),Im(y(1)),...,Re(y(n/2))] # if n is even [y(0),Re(y(1)),Im(y(1)),...,Re(y(n/2)),Im(y(n/2))] # if n is odd
- Parameters:
x (cupy.ndarray) – Array to be transformed.
n (None or int) – Length of the transformed axis of the output. If
n
is not given, the length of the input along the axis specified byaxis
is used.axis (int) – Axis over which to compute the FFT.
overwrite_x (bool) – If True, the contents of
x
can be destroyed.plan (
cupy.cuda.cufft.Plan1d
orNone
) –a cuFFT plan for transforming
x
overaxis
, which can be obtained using:plan = cupyx.scipy.fftpack.get_fft_plan( x, axes, value_type='R2C')
Note that plan is defaulted to None, meaning CuPy will either use an auto-generated plan behind the scene if cupy.fft.config. enable_nd_planning = True, or use no cuFFT plan if it is set to False.
- Returns:
The transformed array.
- Return type:
See also
Note
The argument plan is currently experimental and the interface may be changed in the future version.