About one dimensional DFT is https://doc.sagemath.org/html/en/reference/calculus/sage/calculus/transforms/fft.html But how use twodimensional I try
b = FastFourierTransform(8,8)
but obtain one dimensional array
sage: b [(0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0)]