scipy.fftpack
interface¶
This module implements those functions that replace aspects of the
scipy.fftpack
module. This module provides the entire documented
namespace of scipy.fftpack
, but those functions that are not included
here are imported directly from scipy.fftpack
.
The exceptions raised by each of these functions are mostly as per their
equivalents in scipy.fftpack
, though there are some corner cases in
which this may not be true.
It is notable that unlike scipy.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.
Some corner (mis)usages of scipy.fftpack
may not transfer neatly.
For example, using scipy.fftpack.fft2()
with a non 1D array and
a 2D shape argument will return without exception whereas
pyfftw.interfaces.scipy_fftpack.fft2()
will raise a ValueError.
-
pyfftw.interfaces.scipy_fftpack.
fft
(x, n=None, axis=-1, overwrite_x=False, planner_effort='FFTW_ESTIMATE', threads=1, auto_align_input=True, auto_contiguous=True)¶ Perform a 1D FFT.
The first three arguments are as per
scipy.fftpack.fft()
; the rest of the arguments are documented in the additional argument docs.
-
pyfftw.interfaces.scipy_fftpack.
ifft
(x, n=None, axis=-1, overwrite_x=False, planner_effort='FFTW_ESTIMATE', threads=1, auto_align_input=True, auto_contiguous=True)¶ Perform a 1D inverse FFT.
The first three arguments are as per
scipy.fftpack.ifft()
; the rest of the arguments are documented in the additional argument docs.
-
pyfftw.interfaces.scipy_fftpack.
fftn
(x, shape=None, axes=None, overwrite_x=False, planner_effort='FFTW_ESTIMATE', threads=1, auto_align_input=True, auto_contiguous=True)¶ Perform an n-D FFT.
The first three arguments are as per
scipy.fftpack.fftn()
; the rest of the arguments are documented in the additional argument docs.
-
pyfftw.interfaces.scipy_fftpack.
ifftn
(x, shape=None, axes=None, overwrite_x=False, planner_effort='FFTW_ESTIMATE', threads=1, auto_align_input=True, auto_contiguous=True)¶ Perform an n-D inverse FFT.
The first three arguments are as per
scipy.fftpack.ifftn()
; the rest of the arguments are documented in the additional argument docs.
-
pyfftw.interfaces.scipy_fftpack.
rfft
(x, n=None, axis=-1, overwrite_x=False, planner_effort='FFTW_ESTIMATE', threads=1, auto_align_input=True, auto_contiguous=True)¶ Perform a 1D real FFT.
The first three arguments are as per
scipy.fftpack.rfft()
; the rest of the arguments are documented in the additional argument docs.
-
pyfftw.interfaces.scipy_fftpack.
irfft
(x, n=None, axis=-1, overwrite_x=False, planner_effort='FFTW_ESTIMATE', threads=1, auto_align_input=True, auto_contiguous=True)¶ Perform a 1D real inverse FFT.
The first three arguments are as per
scipy.fftpack.irfft()
; the rest of the arguments are documented in the additional argument docs.
-
pyfftw.interfaces.scipy_fftpack.
fft2
(x, shape=None, axes=(-2, -1), overwrite_x=False, planner_effort='FFTW_ESTIMATE', threads=1, auto_align_input=True, auto_contiguous=True)¶ Perform a 2D FFT.
The first three arguments are as per
scipy.fftpack.fft2()
; the rest of the arguments are documented in the additional argument docs.
-
pyfftw.interfaces.scipy_fftpack.
ifft2
(x, shape=None, axes=(-2, -1), overwrite_x=False, planner_effort='FFTW_ESTIMATE', threads=1, auto_align_input=True, auto_contiguous=True)¶ Perform a 2D inverse FFT.
The first three arguments are as per
scipy.fftpack.ifft2()
; the rest of the arguments are documented in the additional argument docs.