views:

92

answers:

2

Does Python or any of its modules have an equivalent of MATLAB's conv2 function? More specifically, I'm interested in something that does the same computation as conv2(A, B, 'same') in MATLAB.

+1  A: 
scipy.ndimage.convolve

does it in n dimensions.

static_rtti
+1  A: 

Looks like scipy.signal.convolve2d is what you're looking for.

gnovice