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
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
> >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
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):
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
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
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
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.