Skip to main content
The real FFT functions exploit the Hermitian symmetry of the spectrum of real-valued signals. Instead of returning the full n-point spectrum, rfft returns only the first n//2 + 1 unique complex coefficients, cutting storage roughly in half.

rfft

Compute the 1-D FFT of a real-valued array.
Returns: NDArray — Complex128 array of length n//2 + 1 along the transformed axis.

irfft

Compute the inverse of rfft. Reconstructs the full real-valued signal from its positive-frequency spectrum.
Returns: NDArray — Real-valued float64 array of length n.

rfft2

Compute the 2-D FFT of a real-valued array. Applies fft along the first axis and rfft along the last axis, so the last axis is truncated to n//2 + 1.
Returns: NDArray — Complex128 array. The last transform axis has length s[1]//2 + 1.

irfft2

Compute the inverse of rfft2.
Returns: NDArray — Real-valued float64 array.

rfftn

Compute the N-dimensional FFT of a real-valued array. Applies fft along all axes except the last, then rfft along the last axis.
Returns: NDArray — Complex128 array. The last transform axis has length s[-1]//2 + 1.

irfftn

Compute the inverse of rfftn.
Returns: NDArray — Real-valued float64 array.

hfft

Compute the FFT of a signal with Hermitian symmetry (i.e., the spectrum is real-valued). This is the inverse of ihfft.
Returns: NDArray — Real-valued float64 array of length n.

ihfft

Compute the inverse of hfft. Takes a real-valued signal and returns the Hermitian-symmetric spectrum.
Returns: NDArray — Complex128 array of length n//2 + 1.