Re: pasting numpy array into bigger array

2006-07-26 Thread Robert Kern
Tim Heaney wrote: > I think it's a shame there isn't any free documentation for numpy. Tosh. http://www.scipy.org/Tentative_NumPy_Tutorial http://www.scipy.org/Numpy_Example_List http://www.scipy.org/doc/numpy_api_docs/numpy.html -- Robert Kern "I have come to believe that the whole world is

Re: pasting numpy array into bigger array

2006-07-26 Thread TG
Thanks, that's exactly what I needed. Tim Heaney wrote: > You can use Python slice notation for each dimension > > y[1:6,1:6] = x > -- http://mail.python.org/mailman/listinfo/python-list

Re: pasting numpy array into bigger array

2006-07-26 Thread Tim Heaney
"TG" <[EMAIL PROTECTED]> writes: > > let's say I have : > > from numpy import * > x = identity(5) > y = zeros((7,7)) > > I want to paste x into y, starting at coordinates (1,1) in order to > change y to something like this : > > 0 0 0 0 0 0 0 > 0 1 0 0 0 0 0 > 0 0 1 0 0 0 0 > 0 0 0 1 0 0 0 > 0 0 0

pasting numpy array into bigger array

2006-07-26 Thread TG
hi. let's say I have : from numpy import * x = identity(5) y = zeros((7,7)) I want to paste x into y, starting at coordinates (1,1) in order to change y to something like this : 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 how would you do t