# Discrete Fourier transforms (scipy.fft)¶

## Fast Fourier Transforms (FFTs)¶

 fft(x[, n, axis, norm, overwrite_x, workers]) Compute the 1-D discrete Fourier Transform. ifft(x[, n, axis, norm, overwrite_x, workers]) Compute the 1-D inverse discrete Fourier Transform. fft2(x[, s, axes, norm, overwrite_x, workers]) Compute the 2-D discrete Fourier Transform ifft2(x[, s, axes, norm, overwrite_x, workers]) Compute the 2-D inverse discrete Fourier Transform. fftn(x[, s, axes, norm, overwrite_x, workers]) Compute the N-D discrete Fourier Transform. ifftn(x[, s, axes, norm, overwrite_x, workers]) Compute the N-D inverse discrete Fourier Transform. rfft(x[, n, axis, norm, overwrite_x, workers]) Compute the 1-D discrete Fourier Transform for real input. irfft(x[, n, axis, norm, overwrite_x, workers]) Compute the inverse of the n-point DFT for real input. rfft2(x[, s, axes, norm, overwrite_x, workers]) Compute the 2-D FFT of a real array. irfft2(x[, s, axes, norm, overwrite_x, workers]) Compute the 2-D inverse FFT of a real array. rfftn(x[, s, axes, norm, overwrite_x, workers]) Compute the N-D discrete Fourier Transform for real input. irfftn(x[, s, axes, norm, overwrite_x, workers]) Compute the inverse of the N-D FFT of real input. hfft(x[, n, axis, norm, overwrite_x, workers]) Compute the FFT of a signal that has Hermitian symmetry, i.e., a real spectrum. ihfft(x[, n, axis, norm, overwrite_x, workers]) Compute the inverse FFT of a signal that has Hermitian symmetry. hfft2(x[, s, axes, norm, overwrite_x, workers]) Compute the 2-D FFT of a Hermitian complex array. ihfft2(x[, s, axes, norm, overwrite_x, workers]) Compute the 2-D inverse FFT of a real spectrum. hfftn(x[, s, axes, norm, overwrite_x, workers]) Compute the N-D FFT of Hermitian symmetric complex input, i.e., a signal with a real spectrum. ihfftn(x[, s, axes, norm, overwrite_x, workers]) Compute the N-D inverse discrete Fourier Transform for a real spectrum.

## Discrete Sin and Cosine Transforms (DST and DCT)¶

 dct(x[, type, n, axis, norm, overwrite_x, …]) Return the Discrete Cosine Transform of arbitrary type sequence x. idct(x[, type, n, axis, norm, overwrite_x, …]) Return the Inverse Discrete Cosine Transform of an arbitrary type sequence. dctn(x[, type, s, axes, norm, overwrite_x, …]) Return multidimensional Discrete Cosine Transform along the specified axes. idctn(x[, type, s, axes, norm, overwrite_x, …]) Return multidimensional Discrete Cosine Transform along the specified axes. dst(x[, type, n, axis, norm, overwrite_x, …]) Return the Discrete Sine Transform of arbitrary type sequence x. idst(x[, type, n, axis, norm, overwrite_x, …]) Return the Inverse Discrete Sine Transform of an arbitrary type sequence. dstn(x[, type, s, axes, norm, overwrite_x, …]) Return multidimensional Discrete Sine Transform along the specified axes. idstn(x[, type, s, axes, norm, overwrite_x, …]) Return multidimensional Discrete Sine Transform along the specified axes.

## Helper functions¶

 fftshift(x[, axes]) Shift the zero-frequency component to the center of the spectrum. ifftshift(x[, axes]) The inverse of fftshift. fftfreq(n[, d]) Return the Discrete Fourier Transform sample frequencies. rfftfreq(n[, d]) Return the Discrete Fourier Transform sample frequencies (for usage with rfft, irfft). Find the next fast size of input data to fft, for zero-padding, etc. set_workers(workers) Context manager for the default number of workers used in scipy.fft Returns the default number of workers within the current context

## Backend control¶

 set_backend(backend[, coerce, only]) Context manager to set the backend within a fixed scope. skip_backend(backend) Context manager to skip a backend within a fixed scope. set_global_backend(backend) Sets the global fft backend register_backend(backend) Register a backend for permanent use.