[Matrix-SIG] We should rename convolve in multiarraymodule
Wed, 31 Mar 1999 12:39:16 +0800
At 11:59 AM +0800 31/3/99, Travis Oliphant wrote:
>While I've mentioned this privately to some members of the list, I thought
>I might suggest it to all users of NumPy to see the reaction.
>I'm suggesting that "convolve" be renamed to "correlate." as this is what
>the function actually does. It is only the same as a true convolution if
>one of the inputs is symmetric. It is quite easy to obtain a convolution
>from a correlation function as it just involves reversing the axis on one
>of the sequences.
Might I suggest an alternative? How about making convolve do both things,
triggered by an argument?
I, for one, expect to find a convolution routine in a suite that purports
to do signal processing, and might not think to look for such a routine
under the "correlate" moniker.
If backwards compatibility is truly a goal (I have my doubts it's such a
huge problem in scripting environment such as Python), make the argument
default to correlate. That way, people who actually want convolve() to
convolve instead of correlate have a one-liner to insert:
I guess I'm mostly uncomfortable with naming the only routine to perform
such an operation "correlate" instead of "convolve". I think "convolve" is
more widely recognizable and used.
If the current implementation is broken, fix it.
Frank Horowitz email@example.com
Australian Geodynamics Cooperative Research Centre, and
CSIRO-Exploration & Mining, PO Box 437, Nedlands, WA 6009, AUSTRALIA
Direct: +61 8 9284 8431; FAX: +61 8 9389 1906; Reception: +61 8 9389 8421