On 1/29/07, Steve Lianoglou <[EMAIL PROTECTED]> 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
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to