Re: [Numpy-discussion] numpy.interp running time

2011-08-16 Thread Eric Firing
On 08/16/2011 04:22 AM, Timo Kluck wrote: > 2011/8/1 Timo Kluck: >> I just submitted a patch at >> http://projects.scipy.org/numpy/ticket/1920 . It implements Eric's >> suggestion. Please review, I'll be happy to adapt it to any of your >> feedback. >> > I submitted a minor patch a while ago. It ha

Re: [Numpy-discussion] numpy.interp running time

2011-08-16 Thread Timo Kluck
2011/8/1 Timo Kluck : > I just submitted a patch at > http://projects.scipy.org/numpy/ticket/1920 . It implements Eric's > suggestion. Please review, I'll be happy to adapt it to any of your > feedback. > I submitted a minor patch a while ago. It hasn't been reviewed yet, but I don't know whether t

Re: [Numpy-discussion] numpy.interp running time

2011-08-01 Thread Timo Kluck
2011/8/1 Timo Kluck > 2011/7/30 Eric Firing >> Maybe the thing to do is to pre-calculate if len(xp) <= len(x), or some >> such guess as to which method would be more efficient. >> > What you're suggesting is reasonable. The cutoff at len(xp) <= len(x) can > distinguish between the 'refinement' c

Re: [Numpy-discussion] numpy.interp running time

2011-07-31 Thread Timo Kluck
2011/7/30 Eric Firing > On 07/29/2011 11:18 AM, Timo Kluck wrote: > > The current implementation of numpy.interp(x,xp,fp) comes down to: first > > calculating all the slopes of the linear interpolant (these are > > len(xp)-1), then use a binary search to find where x is in xp (running > > time lo

Re: [Numpy-discussion] numpy.interp running time

2011-07-30 Thread Eric Firing
On 07/29/2011 11:18 AM, Timo Kluck wrote: > Dear numpy developers, > > The current implementation of numpy.interp(x,xp,fp) comes down to: first > calculating all the slopes of the linear interpolant (these are > len(xp)-1), then use a binary search to find where x is in xp (running > time log(len(x

[Numpy-discussion] numpy.interp running time

2011-07-29 Thread Timo Kluck
Dear numpy developers, The current implementation of numpy.interp(x,xp,fp) comes down to: first calculating all the slopes of the linear interpolant (these are len(xp)-1), then use a binary search to find where x is in xp (running time log(len(xp)). So we obtain a running time of O( len(xp) + len