8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original ticket http://projects.scipy.org/numpy/ticket/1077 on 2009-04-03 by trac user alk, assigned to unknown.
If n is even (for example n = 8, then fft is described, to return the frequencies at:
[0, 1, 2, 3, 4, -3, -2, -1].
But fftshift(array([0,1,2,3,4,-3,-2,-1]))
returns: [ 4, -3, -2, -1, 0, 1, 2, 3]
and not:
[-3, -2, -1, 0, 1, 2, 3, 4]
The text was updated successfully, but these errors were encountered:
Attachment added by trac user alk on 2009-04-03: helper.py.patch
Sorry, something went wrong.
@pv wrote on 2009-04-03
See comment in #1674
Milestone changed to 1.4.0 by @cournape on 2009-06-01
1.4.0
@rgommers wrote on 2010-07-26
If n is even, there is one more negative than positive value. This is a choice, and consistently done in numpy as far as I'm aware.
In [27]: np.fft.fftshift(np.array([0,1,2,3,-4,-3,-2,-1])) Out[27]: array([-4, -3, -2, -1, 0, 1, 2, 3])
From docstring:
>>> freqs = np.fft.fftfreq(10, 0.1) >>> freqs array([ 0., 1., 2., 3., 4., -5., -4., -3., -2., -1.]) >>> np.fft.fftshift(freqs) array([-5., -4., -3., -2., -1., 0., 1., 2., 3., 4.])
ENH: ticket numpy#1675, Add scalar support for the format() function.
5fe46bd
Backport of 88e8c15.
No branches or pull requests
Original ticket http://projects.scipy.org/numpy/ticket/1077 on 2009-04-03 by trac user alk, assigned to unknown.
If n is even (for example n = 8, then fft is described, to return the frequencies at:
[0, 1, 2, 3, 4, -3, -2, -1].
But fftshift(array([0,1,2,3,4,-3,-2,-1]))
returns:
[ 4, -3, -2, -1, 0, 1, 2, 3]
and not:
[-3, -2, -1, 0, 1, 2, 3, 4]
The text was updated successfully, but these errors were encountered: