scipy.ndimage.filters.convolve - different modes along different axes?
I could use mode='wrap'
and add some dead space at the end of the axis i want to be constant:
import numpyfrom scipy import misc, ndimagelena = misc.lena()image = numpy.vstack((lena, numpy.zeros(lena.shape[1])))weights = numpy.array([[1, 1, 1], [1, 8, 1], [1, 1, 1]])/16.convimage = ndimage.convolve(image, weights, mode='wrap')[0:lena.shape[1],]