I want to know what is the proper way of downsampling a sampled signal using Fourier transform.
In scipy.signal.resample the code it first converts the signal to frequency domain, then discards the middle half of the frequencies (i.e. second and third quarters), then inverse-transform back to time domain. Therefore it is trying to keep the lowest and highest frequencies of the signal.
Due to Nyquist-Shannon we know that we cannot reconstruct a frequency of $f$ without at least $2f+1$ samples of the signal. Then when downsampling, shouldn't we discard the second half of the frequencies instead?
I already read related answers in dsp.stackexchange but couldn't find a good explanation, so I decided to try math.stackexchange.
https://dsp.stackexchange.com/questions/52941/scipy-resample-fourier-method-explanation
https://dsp.stackexchange.com/questions/45446/pythons-tt-resample-vs-tt-resample-poly-vs-tt-decimate
The answer is in the first post you linked to:
So apparently you confused the middle half of the elements as stored in memory with the middle half of the frequencies.