Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-14 Thread Bernhard Spinnler
On 11.10.2013, at 01:19, Julian Taylor wrote: >>> >>>Yeah, unless the current behaviour is actually broken or redundant in >>>some way, we're not going to switch from one perfectly good convention >>>to another perfectly good convention and break everyone's code in the >>>process

Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-10 Thread Julian Taylor
On 10.10.2013 21:31, Bernhard Spinnler wrote: > > On 10.10.2013, at 19:27, David Goldsmith > wrote: >> >> On Wed, Oct 9, 2013 at 7:48 PM, Bernhard Spinnler >> mailto:bernhard.spinn...@gmx.net>> wrote: >> > Hi Richard, >> > >> > Ah, I searched th

Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-10 Thread Bernhard Spinnler
On 10.10.2013, at 19:27, David Goldsmith wrote: > On Wed, Oct 9, 2013 at 7:48 PM, Bernhard Spinnler > wrote: > > Hi Richard, > > > > Ah, I searched the list but didn't find those posts before? > > > > I can easily imagine that correlation is defined differently in different > > disciplines. Both

Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-10 Thread Bernhard Spinnler
It seems to me that Wolfram is following yet another path. From http://mathworld.wolfram.com/Autocorrelation.html and more importantly http://mathworld.wolfram.com/Cross-Correlation.html, equation (5): z_mathworld[k] = sum_n conj(a[n]) * v[n+k] = conj( sum_n a[n] * conj(v[n+k]) )

Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-10 Thread David Goldsmith
Date: Wed, 9 Oct 2013 21:54:07 +0100 > From: Nathaniel Smith > Subject: Re: [Numpy-discussion] Bug in numpy.correlate documentation > To: Discussion of Numerical Python > Message-ID: > z8v-ahuu+85lz88xywmawxgzhk5ghtfuw8h...@mail.gmail.com> > Content-Type: text

Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-09 Thread Nathaniel Smith
On Wed, Oct 9, 2013 at 7:48 PM, Bernhard Spinnler wrote: > Hi Richard, > > Ah, I searched the list but didn't find those posts before… > > I can easily imagine that correlation is defined differently in different > disciplines. Both ways are correct and it's just a convention or definition. > In m

Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-09 Thread David Goldsmith
athworld.wolfram.com/Autocorrelation.html DG Date: Tue, 8 Oct 2013 20:10:41 +0100 > From: Richard Hattersley > Subject: Re: [Numpy-discussion] Bug in numpy.correlate documentation > To: Discussion of Numerical Python > Message-ID: > f...@mail.gmail.com> > Content-Type

Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-09 Thread Bernhard Spinnler
Hi Richard, Ah, I searched the list but didn't find those posts before… I can easily imagine that correlation is defined differently in different disciplines. Both ways are correct and it's just a convention or definition. In my field (Digital Communications, Digital Signal Processing) the vast

Re: [Numpy-discussion] Bug in numpy.correlate documentation

2013-10-08 Thread Richard Hattersley
Hi Bernard, Looks like you're on to something - two other people have raised this discrepancy before: https://github.com/numpy/numpy/issues/2588. Unfortunately, when it comes to resolving the discrepancy one of the previous comments takes the opposite view. Namely, that the docstring is correct an

[Numpy-discussion] Bug in numpy.correlate documentation

2013-10-07 Thread Bernhard Spinnler
The numpy.correlate documentation says: correlate(a, v) = z[k] = sum_n a[n] * conj(v[n+k]) In [1]: a = [1, 2] In [2]: v = [2, 1j] In [3]: z = correlate(a, v, 'full') In [4]: z Out[4]: array([ 0.-1.j, 2.-2.j, 4.+0.j]) However, according to the documentation, z should be z[-1