[SciPy-User] Vectorised convolution
Warren Weckesser
warren.weckesser at enthought.com
Mon Aug 1 22:57:25 EDT 2011
On Mon, Aug 1, 2011 at 9:19 PM, Jason Heeris <jason.heeris at gmail.com> wrote:
> I'm using the scipy.signal.convolve function on an ndarray that represents
> independent sets of data (each set is a row). It seems that with this
> function I need to manually split up the rows to work on them independently,
> otherwise it does a 2D convolution:
>
> for idx in xrange(0, S):
> conv[idx] = sp.signal.convolve(inputs[idx], other, mode='full')
> Is there a vectorised version of this function? In other words, if I were
> doing an FFT I'd use np.fft.fft(inputs, axis=1) — is it possible to do a
> single axis convolution on a 2D array?
I show one way to do this in the following SciPy cookbook entry:
http://www.scipy.org/Cookbook/ApplyFIRFilter
In particular, see the second paragraph.
Warren
> Cheers,
> Jason
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
More information about the SciPy-User
mailing list