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

2008-10-31 Thread Yakov Keselman
My understanding of the root of the problem is that you end up with doing many evaluations of sinc. If this is so, one suggestion is to go with pre-computed filters. For example, if you are resampling from 9 points to 10, essentially you're trying to go from a function that is defined on points 0,

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

2008-10-31 Thread Charles R Harris
On Thu, Oct 30, 2008 at 11:44 PM, frank wang <[EMAIL PROTECTED]> wrote: > 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')=

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

2008-10-30 Thread David Cournapeau
frank wang wrote: > 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 t

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

2008-10-30 Thread David Cournapeau
frank wang wrote: > 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 t

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

2008-10-30 Thread frank wang
[Numpy-discussion] help to speed up the python code> > On Fri, Oct 24, 2008 at 11:30, frank wang <[EMAIL PROTECTED]> wrote:> > Hi,> >> > I have to send this request second time since my first message contains the> > attached data file which is too big and wa

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

2008-10-26 Thread Robert Kern
On Fri, Oct 24, 2008 at 11:30, frank wang <[EMAIL PROTECTED]> 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 matl

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

2008-10-24 Thread frank wang
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