bundles / scipy 1.17.1 / scipy / fftpack / _basic / irfft
function
scipy.fftpack._basic:irfft
source: /scipy/fftpack/_basic.py :208
Signature
def irfft ( x , n = None , axis = -1 , overwrite_x = False ) Summary
Return inverse discrete Fourier transform of real sequence x.
Extended Summary
The contents of x are interpreted as the output of the rfft function.
Parameters
x: array_likeTransformed data to invert.
n: int, optionalLength of the inverse Fourier transform. If n < x.shape[axis], x is truncated. If n > x.shape[axis], x is zero-padded. The default results in n = 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
irfft: ndarray of floatsThe inverse discrete Fourier transform.
Notes
The returned real array contains
[y(0),y(1),...,y(n-1)]where for n is even
y(j) = 1/n (sum[k=1..n/2-1] (x[2*k-1]+sqrt(-1)*x[2*k]) * exp(sqrt(-1)*j*k* 2*pi/n) + c.c. + x[0] + (-1)**(j) x[n-1])
and for n is odd
y(j) = 1/n (sum[k=1..(n-1)/2] (x[2*k-1]+sqrt(-1)*x[2*k]) * exp(sqrt(-1)*j*k* 2*pi/n) + c.c. + x[0])
c.c. denotes complex conjugate of preceding expression.
For details on input parameters, see rfft.
To process (conjugate-symmetric) frequency-domain data with a complex datatype, consider using the newer function scipy.fft.irfft.
Examples
from scipy.fftpack import rfft, irfft a = [1.0, 2.0, 3.0, 4.0, 5.0]✓
irfft(a)
✗irfft(rfft(a))
✓See also
- ifft
- rfft
- scipy.fft.irfft
Aliases
-
scipy.fftpack.irfft