[Numpy-discussion] Nieghbourhood functions

Robert.Denham at dnr.qld.gov.au Robert.Denham at dnr.qld.gov.au
Sun Apr 8 19:06:34 EDT 2001

I am looking for efficient ways to code neighbourhood functions.  For
example a neighbourhod add for an element in an array will simply be the sum
of the neighbours:

1 0 2
3 x 3   , then x becomes 7 (first order neighbour), 11 (2nd order) etc.
1 1 0 

I would be interested in efficient ways of doing this for a whole array,
something like  a_nsum = neighbour_sum(a, order=1), where each element in
a_nsum is the sum of the corresponding element in a.

There must be some work done on neighbourhood functions for arrays, so I
would be grateful for some pointers.

Robert Denham

The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.

Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  

If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  

More information about the NumPy-Discussion mailing list