[Numpy-discussion] fast way to convolve a 2d array with 1d filter

Nadav Horesh nadavh at visionsense.com
Tue Dec 2 07:36:55 EST 2008


You can use 2D convolution routines either in scipy.signal or numpy.numarray.nd_image

  Nadav


-----הודעה מקורית-----
מאת: numpy-discussion-bounces at scipy.org בשם frank wang
נשלח: ג 02-דצמבר-08 03:38
אל: numpy-discussion at scipy.org
נושא: [Numpy-discussion] fast way to convolve a 2d array with 1d filter
 

Hi,
 
I need to convolve a 1d filter with 8 coefficients with a 2d array of the shape (6,7). I can use convolve to perform the operation for each row. This will involve a for loop with a counter 6. I wonder there is 
an fast way to do this in numpy without using for loop. Does anyone know how to do it?
 
Thanks
 
Frank
_________________________________________________________________
Access your email online and on the go with Windows Live Hotmail.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_access_112008

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3494 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20081202/165c3dd1/attachment.bin>


More information about the NumPy-Discussion mailing list