On 1/29/07, Steve Lianoglou <lists.steve at arachnedesign.net> wrote: > For example, say I have a 10x10 array and only want to add some > number to the elements in the submatrix that consists of the [0,1,2] > th rows, and [4,5,6]th colums. Here's one way to do it: i,j = N.mgrid[0:3,4:7] mat[i,j] += 1