Legacy Discrete Fourier transforms (scipy.fftpack)


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

  1. The get_fft_plan function has no counterpart in scipy.fftpack. It returns a cuFFT plan that can be passed to the FFT functions in this module (using the argument plan) to accelarate the computation. The argument plan is currently experimental and the interface may be changed in the future version.
  2. 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 using get_fft_plan.
  3. Like in scipy.fftpack, all FFT functions in this module have an optional argument overwrite_x (default is False), which has the same semantics as in scipy.fftpack: when it is set to True, the input array x 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, ...).