test_fft.py running using: from numpy.fft import fft using: from numpy.fft import ifft from numpy.matlib import real a= [0.0, 0.70709999999999995, 1.0, 0.70709999999999995, 0.0, -0.70709999999999995, -1.0, -0.70709999999999995] b=fft(a) complex = [ 0.00000000e+00 +0.00000000e+00j -3.20820844e-15 -3.99998082e+00j 0.00000000e+00 +0.00000000e+00j 9.95839695e-17 +1.91800920e-05j 0.00000000e+00 +0.00000000e+00j -9.95839695e-17 -1.91800920e-05j 0.00000000e+00 +0.00000000e+00j 3.20820844e-15 +3.99998082e+00j] c=inverse fft ifft(b) complex = [ 0.0000 +0.00000000e+00j 0.7071 +2.77555756e-16j 1.0000 -8.26948102e-16j 0.7071 -2.77555756e-16j 0.0000 +0.00000000e+00j -0.7071 -2.77555756e-16j -1.0000 +8.26948102e-16j -0.7071 +2.77555756e-16j] d=real(c) just real part [ 0. 0.7071 1. 0.7071 0. -0.7071 -1. -0.7071] e=abs(c) absolute value [ 0. 0.7071 1. 0.7071 0. 0.7071 1. 0.7071]