ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> numpy-discussion
numpy-discussion
Re: [Numpy-discussion] Possible typo in numpy.dft.fft docstring
by Travis Oliphant other posts by this author
Jan 26 2006 6:40AM messages near this date
[Numpy-discussion] Possible typo in numpy.dft.fft docstring | [Numpy-discussion] Re: penicillin
Rudolph van der Merwe wrote:

> Part of the fft function's docstring currently reads:
> 
> "...
> 
> The packing of the result is "standard": If A = fft(a, n), then A[0]
>     contains the zero-frequency term, A[1:n/2+1] contains the
>     positive-frequency terms, and A[n/2+1:] contains the negative-frequency
>     terms, in order of decreasingly negative frequency. So for an 8-point
>     transform, the frequencies of the result are [ 0, 1, 2, 3, 4, -3, -2, -1].
> 
> ..."
> 
> Shouldn't the frequency arrangement in the last sentence be
> 
> [0, 1, 2, 3, -4, -3, -2, -1]
> 
>   
> 
> and not
> 
> [ 0, 1, 2, 3, 4, -3, -2, -1]
>   
> 
Of course these are completely equivalent because of the periodicity of 
the DFT, but the statement A[1:n/2+1] contains the positive-frequency 
terms is consistent with what's given.   It think the issue is that this 
statement is true for both even add odd values of n, while writing it 
the way you propose would require different statements for odd and even 
terms.

I do typically interpret the middle frequency as "negative" though (as 
does fftshift).

-Travis



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Thread:
Rudolph van der Merwe
Travis Oliphant

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved