[Numpy-tickets] [NumPy] #932: Add new convolve method for faster computation of even functions
NumPy
numpy-tickets@scipy....
Tue Oct 14 15:05:00 CDT 2008
#932: Add new convolve method for faster computation of even functions
-------------------------+--------------------------------------------------
Reporter: xamusk | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: numpy.core | Version: none
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Convolve and other functions which depend on convolve-like operations,
like acorr, xcorr (those from matplotlib), etc, could use a new method to
operate only on one side of the "full" mode.
So, besides mode being "full", "same" and "valid", there could be a "half"
mode (name only as a proposition) that could compute only one side of the
function (lag>=0) so that it would return only len(x) elements instead of
2*len(x)-1.
This is particularly useful with the acorr function, for which a mode like
that could compute the result much faster and represent only the wanted
elements, much like Matlab's autocorr().
Actual behavior in matlab: autocorr(x)[[BR]]
What is currently needed to do in numpy/pylab:[[BR]]
a=acorr(x-x.mean(),normed=True)[1][len(x)-1:][[BR]]
close()[[BR]]
plot(a,marker='.')[[BR]]
#And that doesn't count doing fancy markings in the plot like the matlab
ones.
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/932>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list