Meaning of the function numpy.fft.fftfreq
问题 Some days ago I came across this answer about the usage of the FFT In the answer there's a piece of code like this: w = np.fft.fft(data) freqs = np.fft.fftfreq(len(w)) I read about the function fftfreq in the numpy documentation (here) and i found that it returns an array with the following content: f = [0, 1, ..., n/2-1, -n/2, ..., -1] / (d*n) if n is even f = [0, 1, ..., (n-1)/2, -(n-1)/2, ..., -1] / (d*n) if n is odd In my case, the d var is equal to 1 and n is an even number. So my