[Numpy-discussion] Concatenating Arrays to make Views

2008-12-15 Thread Benjamin Haynor
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 =

Re: [Numpy-discussion] Concatenating Arrays to make Views

2008-12-15 Thread Robert Kern
On Mon, Dec 15, 2008 at 11:39, Benjamin Haynor bhay...@hotmail.com wrote: 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. No, this is not possible in general with numpy's memory model. -- Robert

Re: [Numpy-discussion] Concatenating Arrays to make Views

2008-12-15 Thread Anne Archibald
2008/12/15 Benjamin Haynor bhay...@hotmail.com: 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 =