Here is the output of Numpy
np.fft.ifft([0, 4, 0, 0]) array([ 1.+0.j, 0.+1.j, -1.+0.j, 0.-1.j]) # may vary
Here is the output of Matlab
res = fft([0, 4, 0, 0]) res = 4.0000 + 0.0000i 0.0000 - 4.0000i -4.0000 + 0.0000i 0.0000 + 4.0000i ifft(res) ans = 0 4 0 0
What is the reason behind different outputs for composition of FFT & iFFT in Numpy and Matlab considering that both of them are used for scientific computation?
How to remedy the problem above in Numpy so I can get the expected result?(Same result as Matlab)