The documentation says that np.fft.fft does this:
Compute the one-dimensional discrete Fourier Transform.
and np.fft.rfft does this:
Compute the one-dimensional discrete Fourier Transform for real input.
I also see that for my data (audio data, real valued), np.fft.fft returns a 2 dimensional array of shape (number_of_frames, fft_length) containing complex numbers.
For np.fft.rfft returns a 2 dimensional array of shape (number_of_frames, ((fft_length/2) + 1)) containing complex numbers. I am led to believe that this only contains nonredundant FFT bins.
Can someone explain in more depth the difference between the commands and why the shape of the returned array is different. Thank you.

所有评论(0)