fft2 — SciPy v1.15.3 Manual (original) (raw)
scipy.fftpack.
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
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