[Numpy-discussion] Problem with correlate
David Cournapeau
david at ar.media.kyoto-u.ac.jp
Tue Jun 2 06:59:07 EDT 2009
Robin wrote:
> On Tue, Jun 2, 2009 at 11:36 AM, David Cournapeau <cournape at gmail.com> wrote:
>
>> Done in r7031 - correlate/PyArray_Correlate should be unchanged, and
>> acorrelate/PyArray_Acorrelate implement the conventional definitions,
>>
>
> I don't know if it's been discussed before but while people are
> thinking about/changing correlate I thought I'd like to request as a
> user a matlab style xcorr function (basically with the functionality
> of the matlab version).
>
> I don't know if this is a deliberate emission, but it is often one of
> the first things my colleagues try when I get them using Python, and
> as far as I know there isn't really a good answer. There is xcorr in
> pylab, but it isn't vectorised like xcorr from matlab...
>
There is one in the talkbox scikit:
http://github.com/cournape/talkbox/blob/202135a9d848931ebd036b97302f1e10d7488c63/scikits/talkbox/tools/correlations.py
It uses the fft, and bonus point, the file is independent of the rest of
toolbox. There is another version which uses direct implementation (this
is faster if you need only a few lags, and it takes less memory too).
David
More information about the NumPy-Discussion
mailing list