[Numpy-discussion] Array views
pav at iki.fi
Sat Mar 26 13:12:22 EDT 2011
On Sat, 26 Mar 2011 13:10:42 -0400, Hugo Gagnon wrote:
> a1 = b[:,0]
> a2 = b[:,1]
> and it works but that doesn't help me for my problem. Is there a way to
> reformulate the first code snippet above but with shallow copying?
No. You need an 2-D array to "own" the data. The second way is the
approach to use if you want to share the data.
More information about the NumPy-Discussion