Discrete Fourier transforms (cupyx.scipy.fft)#
See also
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. |
|
Compute the two-dimensional FFT for real input. |
|
Compute the two-dimensional inverse FFT for real input. |
|
Compute the N-dimensional FFT for real input. |
|
Compute the N-dimensional inverse FFT for real input. |
|
Compute the FFT of a signal that has Hermitian symmetry. |
|
Compute the FFT of a signal that has Hermitian symmetry. |
|
Compute the FFT of a two-dimensional signal that has Hermitian symmetry. |
|
Compute the Inverse FFT of a two-dimensional signal that has Hermitian symmetry. |
|
Compute the FFT of a N-dimensional signal that has Hermitian symmetry. |
|
Compute the Inverse FFT of a N-dimensional signal that has Hermitian symmetry. |
Discrete Cosine and Sine Transforms (DST and DCT)#
|
Return the Discrete Cosine Transform of an array, x. |
|
Return the Inverse Discrete Cosine Transform of an array, x. |
|
Compute a multidimensional Discrete Cosine Transform. |
|
Compute a multidimensional Discrete Cosine Transform. |
|
Return the Discrete Sine Transform of an array, x. |
|
Return the Inverse Discrete Sine Transform of an array, x. |
|
Compute a multidimensional Discrete Sine Transform. |
|
Compute a multidimensional Discrete Sine Transform. |
Fast Hankel Transforms#
|
Compute the fast Hankel transform. |
|
Compute the inverse fast Hankel transform. |
Helper functions#
|
Shift the zero-frequency component to the center of the spectrum. |
|
The inverse of |
|
Return the FFT sample frequencies. |
|
Return the FFT sample frequencies for real input. |
|
Find the next fast size to |
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 the keyword-onlyplanargument or used as a context manager. One exception to this are the DCT and DST transforms, which do not currently support a plan argument.The boolean switch
cupy.fft.config.enable_nd_planningalso 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.fft, all FFT functions in this module have an optional argumentoverwrite_x(default isFalse), which has the same semantics as inscipy.fft: when it is set toTrue, the input arrayxcan (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
cupyx.scipy.fftmodule can also be used as a backend forscipy.ffte.g. by installing withscipy.fft.set_backend(cupyx.scipy.fft). This can allowscipy.fftto work with bothnumpyandcupyarrays. For more information, see SciPy FFT backend.The boolean switch
cupy.fft.config.use_multi_gpusalso affects the FFT functions in this module, see Discrete Fourier Transform (cupy.fft). Moreover, this switch is honored when planning manually usingget_fft_plan().Both type II and III DCT and DST transforms are implemented. Type I and IV transforms are currently unavailable.