Re: [Numpy-discussion] Problem with correlate

2009-06-04 Thread David Cournapeau
On Tue, Jun 2, 2009 at 10:56 PM, Ryan May rma...@gmail.com wrote: On Tue, Jun 2, 2009 at 5:59 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robin wrote: On Tue, Jun 2, 2009 at 11:36 AM, David Cournapeau courn...@gmail.com wrote: Done in r7031 - correlate/PyArray_Correlate

Re: [Numpy-discussion] Problem with correlate

2009-06-04 Thread Ryan May
On Thu, Jun 4, 2009 at 5:14 AM, David Cournapeau courn...@gmail.com wrote: On Tue, Jun 2, 2009 at 10:56 PM, Ryan May rma...@gmail.com wrote: On Tue, Jun 2, 2009 at 5:59 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robin wrote: On Tue, Jun 2, 2009 at 11:36 AM, David

Re: [Numpy-discussion] Problem with correlate

2009-06-03 Thread rob steed
I wonder if xcorrelate would be a better name than acorrelate? I think it would. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread David Cournapeau
On Tue, Jun 2, 2009 at 12:37 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robert Kern wrote: This does not solve the C function problem (PyArray_Correlate). The easy solution would be to keep the current C version, deal with the problem in python for acorrelate for the time being,

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread Robin
On Tue, Jun 2, 2009 at 11:36 AM, David Cournapeau courn...@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

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread David Cournapeau
Robin wrote: On Tue, Jun 2, 2009 at 11:36 AM, David Cournapeau courn...@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

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread Ryan May
On Tue, Jun 2, 2009 at 5:59 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robin wrote: On Tue, Jun 2, 2009 at 11:36 AM, David Cournapeau courn...@gmail.com wrote: Done in r7031 - correlate/PyArray_Correlate should be unchanged, and acorrelate/PyArray_Acorrelate implement the

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread rob steed
I also think that the conjugate should be taken. I spent the last few weeks using correlate to experiment with signal processing and I got strange results until I realised that I had to manually take the conjugate. It would also be good if the function did it since applying the conjugate to

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread David Cournapeau
Charles R Harris wrote: I also think that having weighting options would be good. I now understand the complexities of the various weightings that can be applied to the correlation i.e. biased vs unbiased but I think that having correlate include these options might

Re: [Numpy-discussion] Problem with correlate

2009-06-01 Thread Robert Kern
On Mon, Jun 1, 2009 at 00:05, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: I think we should just fix it to use conjugate - I will do this in the branch, and I will integrate it in the trunk later unless someone stands up vehemently against the change. I opened up a ticket to track

Re: [Numpy-discussion] Problem with correlate

2009-06-01 Thread Charles R Harris
On Mon, Jun 1, 2009 at 11:48 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jun 1, 2009 at 10:35 AM, Robert Kern robert.k...@gmail.comwrote: On Mon, Jun 1, 2009 at 00:05, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: I think we should just fix it to use conjugate -

Re: [Numpy-discussion] Problem with correlate

2009-06-01 Thread Robert Kern
On Mon, Jun 1, 2009 at 13:44, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jun 1, 2009 at 11:48 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jun 1, 2009 at 10:35 AM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jun 1, 2009 at 00:05, David Cournapeau

Re: [Numpy-discussion] Problem with correlate

2009-06-01 Thread David Cournapeau
Charles R Harris wrote: On Mon, Jun 1, 2009 at 11:48 AM, Charles R Harris charlesr.har...@gmail.com mailto:charlesr.har...@gmail.com wrote: On Mon, Jun 1, 2009 at 10:35 AM, Robert Kern robert.k...@gmail.com mailto:robert.k...@gmail.com wrote: On Mon, Jun 1, 2009 at

Re: [Numpy-discussion] Problem with correlate

2009-06-01 Thread Robert Kern
On Mon, Jun 1, 2009 at 22:33, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Charles R Harris wrote: On Mon, Jun 1, 2009 at 11:48 AM, Charles R Harris charlesr.har...@gmail.com mailto:charlesr.har...@gmail.com wrote:     On Mon, Jun 1, 2009 at 10:35 AM, Robert Kern    

[Numpy-discussion] Problem with correlate

2009-05-31 Thread rob steed
Hi, After my previous email, I have opened a ticket #1117 (correlate not order dependent) I have found that the correlate function is defined in multiarraymodule.c and that inputs are being swapped using the following code n1 = ap1-dimensions[0]; n2 = ap2-dimensions[0]; if (n1 n2)

Re: [Numpy-discussion] Problem with correlate

2009-05-31 Thread David Cournapeau
Charles R Harris wrote: On Sun, May 31, 2009 at 11:54 AM, rob steed rjst...@talk21.com mailto:rjst...@talk21.com wrote: Hi, After my previous email, I have opened a ticket #1117 (correlate not order dependent) I have found that the correlate function is defined in

Re: [Numpy-discussion] Problem with correlate

2009-05-31 Thread Charles R Harris
On Sun, May 31, 2009 at 7:18 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Charles R Harris wrote: On Sun, May 31, 2009 at 11:54 AM, rob steed rjst...@talk21.com mailto:rjst...@talk21.com wrote: Hi, After my previous email, I have opened a ticket #1117

Re: [Numpy-discussion] Problem with correlate

2009-05-31 Thread David Cournapeau
Charles R Harris wrote: On Sun, May 31, 2009 at 7:18 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp mailto:da...@ar.media.kyoto-u.ac.jp wrote: Charles R Harris wrote: On Sun, May 31, 2009 at 11:54 AM, rob steed rjst...@talk21.com mailto:rjst...@talk21.com

Re: [Numpy-discussion] Problem with correlate

2009-05-31 Thread Charles R Harris
On Sun, May 31, 2009 at 9:08 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Charles R Harris wrote: On Sun, May 31, 2009 at 7:18 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp mailto:da...@ar.media.kyoto-u.ac.jp wrote: Charles R Harris wrote:

Re: [Numpy-discussion] Problem with correlate

2009-05-31 Thread David Cournapeau
Charles R Harris wrote: On Sun, May 31, 2009 at 9:08 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp mailto:da...@ar.media.kyoto-u.ac.jp wrote: Charles R Harris wrote: On Sun, May 31, 2009 at 7:18 PM, David Cournapeau da...@ar.media.kyoto-u.ac.jp

[Numpy-discussion] Problem with correlate

2009-05-18 Thread rob steed
Hi all, I have been using numpy.correlate and was finding something weird. I now think that there might be a bug. Correlations should be order dependent eg. correlate(x,y) != correlate(y,x) in general (whereas convolutions are symmetric) import numpy as N x = N.array([1,0,0]) y =

Re: [Numpy-discussion] Problem with correlate

2009-05-18 Thread Stéfan van der Walt
2009/5/18 rob steed rjst...@talk21.com: This works fine. However, if the arrays have different lengths, we get a problem. y2=N.array([0,0,0,1]) N.correlate(x,y2,'full') This looks like a bug to me. In [54]: N.correlate([1, 0, 0, 0], [0, 0, 0, 1],'full') Out[54]: array([1, 0, 0, 0, 0, 0,

Re: [Numpy-discussion] Problem with correlate

2009-05-18 Thread josef . pktd
2009/5/18 Stéfan van der Walt ste...@sun.ac.za: 2009/5/18 rob steed rjst...@talk21.com: This works fine. However, if the arrays have different lengths, we get a problem. y2=N.array([0,0,0,1]) N.correlate(x,y2,'full') This looks like a bug to me. In [54]: N.correlate([1, 0, 0, 0], [0, 0,

Re: [Numpy-discussion] Problem with correlate?

2008-08-22 Thread Hanno Klemm
Hi Stefan, yes, indeed, that's what I thought. This result is odd. Has correlate been changed since version 1.0.4, or should I submit this as a bug? Best regards, Hanno Stéfan van der Walt [EMAIL PROTECTED] said: --=_Part_25307_10322093.1219268954678 Content-Type: text/plain;

Re: [Numpy-discussion] Problem with correlate?

2008-08-22 Thread Stéfan van der Walt
Hi Hanno 2008/8/22 Hanno Klemm [EMAIL PROTECTED]: yes, indeed, that's what I thought. This result is odd. Has correlate been changed since version 1.0.4, or should I submit this as a bug? Is there any way that you could try out the latest release on your machine and see if it solves your

Re: [Numpy-discussion] Problem with correlate?

2008-08-22 Thread Hanno Klemm
Hi Stefan, I checked it with numpy version 1.1.1 just now and the result is the same: x = N.array([0.,0,1,0,0]) y1 = N.array([1.,0,0,0,0]) N.correlate(x,y1, mode='full') array([ 0., 0., 0., 0., 0., 0., 1., 0., 0.]) y2 = N.array([1.,0,0,0,0,0,0]) N.correlate(x,y2, mode='full')

[Numpy-discussion] Problem with correlate?

2008-08-20 Thread Hanno Klemm
Hi All, after the discussion on numpy.correlate some time ago, regarding complex conjugation, etc. I today was pointed to yet another oddity, which I hope somebody could explain to me, as to why that's a feature, rather than a bug. I'm thoroughly confused by the following behaviour: In [29]:

Re: [Numpy-discussion] Problem with correlate?

2008-08-20 Thread Stéfan van der Walt
2008/8/20 Hanno Klemm [EMAIL PROTECTED]: In [29]: x = array([0.,0.,1, 0, 0]) In [35]: y1 = array([1,0,0,0,0]) In [36]: correlate(x,y1,mode='full') Out[36]: array([ 0., 0., 0., 0., 0., 0., 1., 0., 0.]) That doesn't look right. Under r5661: In [60]: np.convolve([0, 0, 1, 0, 0], [1,