bundles / scipy latest / scipy / fftpack / _basic / ifft
function
scipy.fftpack._basic:ifft
source: /scipy/fftpack/_basic.py :91
Signature
def ifft ( x , n = None , axis = -1 , overwrite_x = False ) Summary
Return discrete inverse Fourier transform of real or complex sequence.
Extended Summary
The returned complex array contains y(0), y(1),..., y(n-1), where
y(j) = (x * exp(2*pi*sqrt(-1)*j*np.arange(n)/n)).mean().
Parameters
x: array_likeTransformed data to invert.
n: int, optionalLength of the inverse Fourier transform. If
n < x.shape[axis],xis truncated. Ifn > x.shape[axis],xis zero-padded. The default results inn = x.shape[axis].axis: int, optionalAxis along which the ifft's are computed; the default is over the last axis (i.e.,
axis=-1).overwrite_x: bool, optionalIf True, the contents of
xcan be destroyed; the default is False.
Returns
ifft: ndarray of floatsThe inverse discrete Fourier transform.
Notes
Both single and double precision routines are implemented. Half precision inputs will be converted to single precision. Non-floating-point inputs will be converted to double precision. Long-double precision inputs are not supported.
This function is most efficient when n is a power of two, and least efficient when n is prime.
If the data type of x is real, a "real IFFT" algorithm is automatically used, which roughly halves the computation time.
Examples
from scipy.fftpack import fft, ifft import numpy as np x = np.arange(5) np.allclose(ifft(fft(x)), x, atol=1e-15) # within numerical accuracy.✓
See also
- fft
Forward FFT
Aliases
-
scipy.fftpack.ifft