scipy/scipy — pull request #2471 by endolith (2013-05-09 15:59:08+00:00)
Title: DOC: add note about using fftshift, change Nyquist sign

1. Added a note about using fftshift to re-center the frequencies
2. Changed the description so that the Nyquist frequency is considered negative, since this is how fftfreq and fftshift do it:

In : fftshift(fftfreq(8, 1/8))
Out: array([-4., -3., -2., -1., 0., 1., 2., 3.])
3. backticks around variables, whitespace changes

For #2, the description is different when n is odd, though:

In [31]: fftfreq(8, 1/8)
Out[31]: array([ 0., 1., 2., 3., -4., -3., -2., -1.])

In [32]: fftfreq(7, 1/7)
Out[32]: array([ 0., 1., 2., 3., -3., -2., -1.])

So maybe the description should say

> A[1:(n+1)/2] contains the positive-frequency terms, and
> A[(n+1)//2:] contains the negative-frequency terms