Dear tutors, Given an image, I want to generate another image with the mean values of the pixels in their neighbourhood, thereby ignoring some of the neighbouring pixels (e.g. the padded boundary). I hoped I could use masked arrays for that, but apparently, this does not work.
-- def fnc(buffer) return numpy.mean(buffer) mean = scipy.ndimage.generic_filter(masked_array, fnc, footprint = f, mode = 'constant', cval = 0.0) -- Is there a way to get around this issue, or do I have to accept the filter function can not handle masked arrays? Thanks in advance! Sincerely, Koen _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor