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

2008-12-15 Thread Anne Archibald
2008/12/15 Benjamin Haynor : > 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]]) >

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

2008-12-15 Thread Robert Kern
On Mon, Dec 15, 2008 at 11:39, Benjamin Haynor 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 Kern "I have co

[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 = n