# Why is the last value of an RFFT always real?

I am using numpy to do FFTs of real-valued data. And I don't understand why the Nyquist frequency is always real (or has zero phase).

So, say A = rfft(data) then A[-1] is always a real value, and not complex. Is this the correct value for that frequency? Or is this a computational artifact that can be fixed?

The explanation given in the documentation is:

A[-1] contains the term representing both positive and negative Nyquist frequency (+fs/2 and -fs/2), and must also be purely real.

Is there a way to extract only the positive frequency and get rid of the degeneracy in the imaginary component caused by the Hermitian nature of the real FFT?

Think about it: the FFT at the end will be taken using the "complex" exponential with values [1 -1 1 -1 1 -1 ...] which will always be real valued. If the signal is also real valued, then that coefficient cannot be complex.