[Numpy-discussion] "moving window" in numpy

Stefan van der Walt stefan@sun.ac...
Mon Nov 26 07:34:56 CST 2007


Hi Matthew

On Sun, Nov 25, 2007 at 05:00:48PM -0800, Matthew Perry wrote:
>  I'm not sure if my terminology is familiar but I'm trying to do a
> "moving window" analysis (ie a spatial filter or kernel) on a 2-D
> array representing elevation. For example, a 3x3 window centered on
> each cell is used to calculate the derivate slope of that cell.

Take a look at Anne Archibald's post:

http://projects.scipy.org/pipermail/numpy-discussion/2006-November/024760.html

and its attachment here:

http://projects.scipy.org/pipermail/numpy-discussion/attachments/20061120/d057cb0b/attachment.py

Regards
Stéfan


More information about the Numpy-discussion mailing list