[Numpy-discussion] Concatenating Arrays to make Views

Benjamin Haynor bhaynor@hotmail....
Mon Dec 15 13:39:41 CST 2008


Hi,

I was wondering if I can concatenate 3 arrays, where the result will be a view of the original three arrays, instead of a copy of the data.  For example, suppose I write the following
import numpy as n
a = n.array([[1,2],[3,4]])
b = n.array([[5,6],[7,8]])
c = n.array([[9,10],[11,12]])
c = n.r_[a,b]
Now c = :
[[1,2],
[3,4],
[5,6],
[7,8],
[9,10],
[11,12]]
I was hoping to get an array, such that, when I change d, a, b, and c will also change appropriately.
Any ideas?

- Ben
bhaynor@hotmail.com

_________________________________________________________________
Send e-mail anywhere. No map, no compass.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_anywhere_122008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20081215/45d63936/attachment.html 


More information about the Numpy-discussion mailing list