[SciPy-User] Vectorised convolution

David Baddeley david_baddeley@yahoo.com...
Mon Aug 1 21:37:54 CDT 2011

try scipy.ndimage.convolve1d

It doesn't seem to support mode='full' though


From: Jason Heeris <jason.heeris@gmail.com>
To: SciPy Users List <scipy-user@scipy.org>
Sent: Tue, 2 August, 2011 2:19:02 PM
Subject: [SciPy-User] Vectorised convolution

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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110801/c8aa6d5f/attachment.html 

More information about the SciPy-User mailing list