Legacy discrete fourier transforms (cupyx.scipy.fftpack
)#
Note
As of SciPy version 1.4.0, scipy.fft
is recommended over
scipy.fftpack
. Consider using cupyx.scipy.fft
instead.
Fast Fourier Transforms (FFTs)#
|
Compute the one-dimensional FFT. |
|
Compute the one-dimensional inverse FFT. |
|
Compute the two-dimensional FFT. |
|
Compute the two-dimensional inverse FFT. |
|
Compute the N-dimensional FFT. |
|
Compute the N-dimensional inverse FFT. |
|
Compute the one-dimensional FFT for real input. |
|
Compute the one-dimensional inverse FFT for real input. |
|
Generate a CUDA FFT plan for transforming up to three axes. |
Code compatibility features#
As with other FFT modules in CuPy, FFT functions in this module can take advantage of an existing cuFFT plan (returned by
get_fft_plan()
) to accelerate the computation. The plan can be either passed in explicitly via theplan
argument or used as a context manager. The argumentplan
is currently experimental and the interface may be changed in the future version. Theget_fft_plan()
function has no counterpart inscipy.fftpack
.The boolean switch
cupy.fft.config.enable_nd_planning
also affects the FFT functions in this module, see Discrete Fourier Transform (cupy.fft). This switch is neglected when planning manually usingget_fft_plan()
.Like in
scipy.fftpack
, all FFT functions in this module have an optional argumentoverwrite_x
(default isFalse
), which has the same semantics as inscipy.fftpack
: when it is set toTrue
, the input arrayx
can (not will) be overwritten arbitrarily. For this reason, when an in-place FFT is desired, the user should always reassign the input in the following manner:x = cupyx.scipy.fftpack.fft(x, ..., overwrite_x=True, ...)
.The boolean switch
cupy.fft.config.use_multi_gpus
also affects the FFT functions in this module, see Discrete Fourier Transform (cupy.fft). Moreover, this switch is honored when planning manually usingget_fft_plan()
.