Legacy Discrete Fourier transforms (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¶
cupyx.scipy.fftpack.fft |
Compute the one-dimensional FFT. |
cupyx.scipy.fftpack.ifft |
Compute the one-dimensional inverse FFT. |
cupyx.scipy.fftpack.fft2 |
Compute the two-dimensional FFT. |
cupyx.scipy.fftpack.ifft2 |
Compute the two-dimensional inverse FFT. |
cupyx.scipy.fftpack.fftn |
Compute the N-dimensional FFT. |
cupyx.scipy.fftpack.ifftn |
Compute the N-dimensional inverse FFT. |
cupyx.scipy.fftpack.rfft |
Compute the one-dimensional FFT for real input. |
cupyx.scipy.fftpack.irfft |
Compute the one-dimensional inverse FFT for real input. |
cupyx.scipy.fftpack.get_fft_plan |
Generate a CUDA FFT plan for transforming up to three axes. |
Code compatibility features¶
- The
get_fft_plan
function has no counterpart inscipy.fftpack
. It returns a cuFFT plan that can be passed to the FFT functions in this module (using the argumentplan
) to accelarate the computation. The argumentplan
is currently experimental and the interface may be changed in the future version. - The boolean switch
cupy.fft.config.enable_nd_planning
also affects the FFT functions in this module, see FFT Functions. 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 destroyed and replaced by the output. 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, ...)
.