[Numpy-discussion] Bug in numpy.correlate documentation
d.l.goldsmith at gmail.com
Wed Oct 9 16:19:05 EDT 2013
Looks like Wolfram MathWorld would favor the docstring, but the possibility
of a "use-domain" dependency seems plausible (after all, a similar dilemma
is observed, e.g., w/ the Fourier Transform)--I guess one discipline's
future is another discipline's past. :-)
Date: Tue, 8 Oct 2013 20:10:41 +0100
> From: Richard Hattersley <rhattersley at gmail.com>
> Subject: Re: [Numpy-discussion] Bug in numpy.correlate documentation
> To: Discussion of Numerical Python <numpy-discussion at scipy.org>
> fw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 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 and the code is wrong.
> Do different domains use different conventions here? Are there some
> references to back up one stance or another?
> But all else being equal, I'm guessing there'll be far more appetite for
> updating the documentation than the code.
> Richard Hattersley
> On 7 October 2013 22:09, Bernhard Spinnler <Bernhard.Spinnler at gmx.net
> > The numpy.correlate documentation says:
> > correlate(a, v) = z[k] = sum_n a[n] * conj(v[n+k])
> > [so] according to the documentation, z should be
> > z[-1] = a * conj(v) = 4.+0.j
> > z = a * conj(v) + a * conj(v) = 2.-2.j
> > z = a * conj(v) = 0.-1.j
> > which is the time reversed version of what correlate() calculates.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion