Re: [Numpy-discussion] performance of the numpy

2008-09-25 Thread Nadav Horesh
CTED] בשם David Cournapeau נשלח: ה 25-ספטמבר-08 09:19 אל: Discussion of Numerical Python נושא: Re: [Numpy-discussion] performance of the numpy On Thu, Sep 25, 2008 at 9:36 AM, frank wang <[EMAIL PROTECTED]> wrote: > Hi, All, > > I am using ipython with --pylab flag. ipython loads the

Re: [Numpy-discussion] performance of the numpy

2008-09-24 Thread David Cournapeau
On Thu, Sep 25, 2008 at 9:36 AM, frank wang <[EMAIL PROTECTED]> wrote: > Hi, All, > > I am using ipython with --pylab flag. ipython loads the numpy into the > workspace, so I do not know abs is from python or numpy. The weird thing is > if I execute the code line by line, I do not have any speed pr

Re: [Numpy-discussion] performance of the numpy

2008-09-24 Thread Matthieu Brucher
> >From my understanding, using the modulename.functionname will slow down the > python performance. For a big simulation, it may not be a good idear. The slowdown is very small (I'd say inferior to a ms), it's nothing compared to the way you're doing your computations. Matthieu -- French PhD st

Re: [Numpy-discussion] performance of the numpy

2008-09-24 Thread frank wang
Thanks Frank> Date: Wed, 24 Sep 2008 15:37:03 -0700> From: [EMAIL PROTECTED]> To: numpy-discussion@scipy.org> Subject: Re: [Numpy-discussion] performance of the numpy> > Nadav Horesh wrote:> > You should use absolute (a ufunc) and not abs (internal python function):

Re: [Numpy-discussion] performance of the numpy

2008-09-24 Thread Christopher Barker
Nadav Horesh wrote: > You should use absolute (a ufunc) and not abs (internal python function): > plot(absolute(fft(b))) another reason why "import *" is a bad idea: import numpy as np import pylab as plot #(what is the convention for this now?) pylab.plot(np.absolute(np.fft(b))) yes, it

Re: [Numpy-discussion] performance of the numpy

2008-09-23 Thread David Cournapeau
frank wang wrote: > Hi, I am new user from matlab world. So I always compare with matlab. > in my code, i have a large array with about 10 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))) Can you post the ex

Re: [Numpy-discussion] performance of the numpy

2008-09-23 Thread Nadav Horesh
You should use absolute (a ufunc) and not abs (internal python function): >>> plot(absolute(fft(b))) Nadav. -הודעה מקורית- מאת: [EMAIL PROTECTED] בשם frank wang נשלח: ד 24-ספטמבר-08 08:21 אל: Discussion of Numerical Python נושא: [Numpy-discussion] performance of the numpy

[Numpy-discussion] performance of the numpy

2008-09-23 Thread frank wang
Hi, I am new user from matlab world. So I always compare with matlab. in my code, i have a large array with about 10 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.