testfft.py running, using numpy.fft a= [ 0. 0.7071 1. 0.7071 0. -0.7071 -1. -0.7071] b=fft(a)= [ 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] abs(b)= [ 0.00000000e+00 3.99998082e+00 0.00000000e+00 1.91800920e-05 0.00000000e+00 1.91800920e-05 0.00000000e+00 3.99998082e+00] fftshift(abs(b))= [ 0.00000000e+00 1.91800920e-05 0.00000000e+00 3.99998082e+00 0.00000000e+00 3.99998082e+00 0.00000000e+00 1.91800920e-05] c=ifft(b)= [ 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] abs(c)= [ 0. 0.7071 1. 0.7071 0. 0.7071 1. 0.7071] dir(numpy.fft) ['fft', 'fft2', 'fftfreq', 'fftn', 'fftpack', 'fftpack_lite', 'fftshift', 'helper', 'hfft', 'ifft', 'ifft2', 'ifftn', 'ifftshift', 'ihfft', 'info', 'irefft', 'irefft2', 'irefftn', 'irfft', 'irfft2', 'irfftn', 'refft', 'refft2', 'refftn', 'rfft', 'rfft2', 'rfftn', 'test']