[Numpy-discussion] help to speed up the python code

frank wang f.yw@hotmail....
Fri Oct 31 00:44:32 CDT 2008


Hi, Bob,
 
The problem is that I want to resample my data with another sampling rate. the two rates is very close. I use the formula:
 
s(t)=sum(a_k*sinc(t-kTs)).
 
the new sampling rate is Ts', so I have 
s(nTs')=sum(a_k*sinc(nTs'-kTs)). The sum index k is over the (-P, P), Centered at n. The n is start from zero. THe code is using two for loops and it is slow. The length of s(nTs) is very long, so it takes quite long time to do it. 
 
Thanks
 
Frank> Date: Sun, 26 Oct 2008 22:45:42 -0500> From: robert.kern@gmail.com> To: numpy-discussion@scipy.org> Subject: Re: [Numpy-discussion] help to speed up the python code> > On Fri, Oct 24, 2008 at 11:30, frank wang <f.yw@hotmail.com> wrote:> > Hi,> >> > I have to send this request second time since my first message contains the> > attached data file which is too big and was blocked by the system. So this> > time I will not attach the data file.> >> > I have converted a matlab function to python using numpy. both matlab and> > python run slow. I know that numpy has a lot of features, so I hope some> > experts can help me to speed up the code.> > Can you describe in higher level terms what you are trying to do? I'm> having trouble following the code.> > -- > Robert Kern> > "I have come to believe that the whole world is an enigma, a harmless> enigma that is made terrible by our own mad attempt to interpret it as> though it had an underlying truth."> -- Umberto Eco> _______________________________________________> Numpy-discussion mailing list> Numpy-discussion@scipy.org> http://projects.scipy.org/mailman/listinfo/numpy-discussion
_________________________________________________________________
Stay organized with simple drag and drop from Windows Live Hotmail.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20081030/74300736/attachment.html 


More information about the Numpy-discussion mailing list