numpy.fft interface

This module implements those functions that replace aspects of the numpy.fft module. This module provides the entire documented namespace of numpy.fft, but those functions that are not included here are imported directly from numpy.fft.

It is notable that unlike numpy.fftpack, these functions will generally return an output array with the same precision as the input array, and the transform that is chosen is chosen based on the precision of the input array. That is, if the input array is 32-bit floating point, then the transform will be 32-bit floating point and so will the returned array. Half precision input will be converted to single precision. Otherwise, if any type conversion is required, the default will be double precision. If pyFFTW was not built with support for double precision, the default is long double precision. If that is not available, it defaults to single precision.

One known caveat is that repeated axes are handled differently to numpy.fft; axes that are repeated in the axes argument are considered only once, as compared to numpy.fft in which repeated axes results in the DFT being taken along that axes as many times as the axis occurs.

The exceptions raised by each of these functions are mostly as per their equivalents in numpy.fft, though there are some corner cases in which this may not be true.

pyfftw.interfaces.numpy_fft.fft(a, n=None, axis=-1, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 1D FFT.

The first four arguments are as per numpy.fft.fft(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.fft2(a, s=None, axes=(-2, -1), norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 2D FFT.

The first four arguments are as per numpy.fft.fft2(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.fftn(a, s=None, axes=None, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform an n-D FFT.

The first four arguments are as per numpy.fft.fftn(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.hfft(a, n=None, axis=-1, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 1D FFT of a signal with hermitian symmetry. This yields a real output spectrum. See numpy.fft.hfft() for more information.

The first four arguments are as per numpy.fft.hfft(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.ifft(a, n=None, axis=-1, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 1D inverse FFT.

The first four arguments are as per numpy.fft.ifft(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.ifft2(a, s=None, axes=(-2, -1), norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 2D inverse FFT.

The first four arguments are as per numpy.fft.ifft2(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.ifftn(a, s=None, axes=None, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform an n-D inverse FFT.

The first four arguments are as per numpy.fft.ifftn(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.ihfft(a, n=None, axis=-1, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 1D inverse FFT of a real-spectrum, yielding a signal with hermitian symmetry. See numpy.fft.ihfft() for more information.

The first four arguments are as per numpy.fft.ihfft(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.irfft(a, n=None, axis=-1, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 1D real inverse FFT.

The first four arguments are as per numpy.fft.irfft(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.irfft2(a, s=None, axes=(-2, -1), norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 2D real inverse FFT.

The first four arguments are as per numpy.fft.irfft2(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.irfftn(a, s=None, axes=None, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform an n-D real inverse FFT.

The first four arguments are as per numpy.fft.rfftn(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.rfft(a, n=None, axis=-1, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 1D real FFT.

The first four arguments are as per numpy.fft.rfft(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.rfft2(a, s=None, axes=(-2, -1), norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform a 2D real FFT.

The first four arguments are as per numpy.fft.rfft2(); the rest of the arguments are documented in the additional arguments docs.

pyfftw.interfaces.numpy_fft.rfftn(a, s=None, axes=None, norm=None, overwrite_input=False, planner_effort=None, threads=None, auto_align_input=True, auto_contiguous=True)

Perform an n-D real FFT.

The first four arguments are as per numpy.fft.rfftn(); the rest of the arguments are documented in the additional arguments docs.