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. If any type conversion is required, the default will be double 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='FFTW_MEASURE', threads=1, 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.ifft(a, n=None, axis=-1, norm=None, overwrite_input=False, planner_effort='FFTW_MEASURE', threads=1, 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.fft2(a, s=None, axes=(-2, -1), norm=None, overwrite_input=False, planner_effort='FFTW_MEASURE', threads=1, 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.ifft2(a, s=None, axes=(-2, -1), norm=None, overwrite_input=False, planner_effort='FFTW_MEASURE', threads=1, 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.fftn(a, s=None, axes=None, norm=None, overwrite_input=False, planner_effort='FFTW_MEASURE', threads=1, 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.ifftn(a, s=None, axes=None, norm=None, overwrite_input=False, planner_effort='FFTW_MEASURE', threads=1, 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.rfft(a, n=None, axis=-1, overwrite_input=False, planner_effort='FFTW_MEASURE', threads=1, auto_align_input=True, auto_contiguous=True)

Perform a 1D real FFT.

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

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

Perform a 1D real inverse FFT.

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

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

Perform a 2D real FFT.

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

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

Perform a 2D real inverse FFT.

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

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

Perform an n-D real FFT.

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

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

Perform an n-D real inverse FFT.

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

Previous topic

pyfftw.interfaces - Drop in replacements for other FFT implementations

Next topic

scipy.fftpack interface

This Page