[Numpy-discussion] performance of the numpy

Nadav Horesh nadavh@visionsense....
Wed Sep 24 00:38:56 CDT 2008


You should use absolute (a ufunc) and not abs (internal python function):

>>> plot(absolute(fft(b)))

Nadav.


-----הודעה מקורית-----
מאת: numpy-discussion-bounces@scipy.org בשם frank wang
נשלח: ד 24-ספטמבר-08 08:21
אל: Discussion of Numerical Python
נושא: [Numpy-discussion] performance of the numpy
 

Hi, I am new user from matlab world. So I always compare with matlab. in my code, i have a large array with about 100000 data. when I perform
 
c=fft(b)
d=abs(c)
plot(d)
 
I got good response. however, when i try to execute:
plot(abs(fft(b)))
 
it takes forever and i have to kill the operation. 
 
In another situation, i want debug my code, so i use pdb.set_trace() to break and then execute the next command:
c=fft(b)
 
Then the python keeps running and never got out. I have to kiill it too. i posts this and hope the expert will fix this in future.
 
Thanks for the great work.
 
Frank
_________________________________________________________________
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3544 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080924/2d7e5aec/attachment.bin 


More information about the Numpy-discussion mailing list