I need the inverse Fourier transform of a complex array. ifft
should return a real array, but it returns another complex array.
In MATLAB,
a=ifft(fft(a))
, but in Python it does not work like that.
a = np.arange(6)
m = ifft(fft(a))
m # Google says m should = a, but m is complex
Output :
array([0.+0.00000000e+00j, 1.+3.70074342e-16j, 2.+0.00000000e+00j,
3.-5.68396583e-17j, 4.+0.00000000e+00j, 5.-3.13234683e-16j])
a
should have been a complex array...