[Numpy-discussion] help to speed up the python code
Fri Oct 31 00:44:32 CDT 2008
The problem is that I want to resample my data with another sampling rate. the two rates is very close. I use the formula:
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.
Frank> Date: Sun, 26 Oct 2008 22:45:42 -0500> From: email@example.com> To: firstname.lastname@example.org> Subject: Re: [Numpy-discussion] help to speed up the python code> > On Fri, Oct 24, 2008 at 11:30, frank wang <email@example.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> Numpyfirstname.lastname@example.org> http://projects.scipy.org/mailman/listinfo/numpy-discussion
Stay organized with simple drag and drop from Windows Live Hotmail.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion