[Numpy-discussion] building an array using smaller ones
Rudolf Sykora
rudolf.sykora@gmail....
Tue Feb 27 13:53:57 CST 2007
Hello everybody,
I wonder how I could most easily accomplish the following:
Say I have sth like:
a = array( [1, 2] )
and I want to use this array to build another array in the following sence:
b = array( [[1, 2, 3, a], [5, a, 6, 7], [0, 2-a, 3, 4]]) # this doesn't
work
I would like to obtain
b = array( [[1, 2, 3, 1, 2], [5 ,1 ,2 ,6 ,7], [0, 1, 0, 3, 4]] )
I know a rather complicated way but believe there must be an easy one.
Thank you very much.
Ruda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070227/4a8400ef/attachment.html
More information about the Numpy-discussion
mailing list