scipy.fftpack.

fft2#

scipy.fftpack.fft2(x, shape=None, axes=(-2, -1), overwrite_x=False)[source]#

2-D discrete Fourier transform.

Return the 2-D discrete Fourier transform of the 2-D argument x.

See also

fftn

for detailed information.

Examples

>>> import numpy as np
>>> from scipy.fftpack import fft2, ifft2
>>> y = np.mgrid[:5, :5][0]
>>> y
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]])
>>> np.allclose(y, ifft2(fft2(y)))
True