[SciPy-user] Correlate Times?
Fri Jan 18 00:56:01 CST 2008
talking about cleanup, I see that the delaunay package is duplicated in
scipy.sandbox and scikits. The files seem fairly identical....
Travis E. Oliphant wrote:
> Ryan May wrote:
>> Can someone explain this to me?
>> In : import scipy as S
>> In : import scipy.signal as SS
>> In : from numpy.random import rand
>> In : up = rand(18000)
>> In : %timeit N.correlate(up,up,mode='full')
>> 10 loops, best of 3: 829 ms per loop
>> In : %timeit S.correlate(up,up,mode='full')
>> 10 loops, best of 3: 827 ms per loop
>> In : %timeit SS.correlate(up,up,mode='full')
>> 10 loops, best of 3: 11.5 s per loop
>> Is this a configuration problem? If not, why does
>> scipy.signal.correlate even exist?
> scipy.signal.correlate is a N-d correlation algorithm as has been
> noted. It is going to be slower for 1-d arrays. Now, there is nothing
> wrong with checking for that case and calling the 1-d version, it's just
> never been done (probably because people who only need 1-d correlation
> are already just using numpy.correlate).
> ndimage also has N-d correlation inside it which was created much
> later. I think it is currently faster (but with different arguments
> that I don't fully understand so, I'm not sure what command would be
> Try scipy.ndimage.correlate and see how fast it is.
> This is part of the kind of clean-up that SciPy really needs.
> SciPy-user mailing list
More information about the SciPy-user