fft.ifft2
Description
Compute the 2-dimensional inverse discrete Fourier Transform.
Mandatory Input Parameters
Parameter |
Type |
Description |
|---|---|---|
a |
array_like |
Input array, which can be a complex number |
Optional Input Parameters
Return Value
Type |
Description |
|---|---|
ndarray |
The truncated or zero-padded input, transformed along the axes specified by axes, or the last two axes if axes is not specified. |
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | >>> import numpy as np >>> a = np.mgrid[:5, :5][0] >>> a array([[0, 0, 0, 0, 0], [1, 1, 1, 1, 1], [2, 2, 2, 2, 2], [3, 3, 3, 3, 3], [4, 4, 4, 4, 4]]) >>> >>> t = np.fft.fft2(a) >>> t array([[ 50. +0.j , 0. +0.j , 0. +0.j , 0. +0.j , 0. +0.j ], [-12.5+17.20477401j, 0. +0.j , 0. +0.j , 0. +0.j , 0. +0.j ], [-12.5 +4.0614962j , 0. +0.j , 0. +0.j , 0. +0.j , 0. +0.j ], [-12.5 -4.0614962j , 0. +0.j , 0. +0.j , 0. +0.j , 0. +0.j ], [-12.5-17.20477401j, 0. +0.j , 0. +0.j , 0. +0.j , 0. +0.j ]]) >>> >>> np.fft.ifft2(t) array([[0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j], [1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j], [2.+0.j, 2.+0.j, 2.+0.j, 2.+0.j, 2.+0.j], [3.+0.j, 3.+0.j, 3.+0.j, 3.+0.j, 3.+0.j], [4.+0.j, 4.+0.j, 4.+0.j, 4.+0.j, 4.+0.j]]) >>> |
Parent topic: Fourier Transform Functions