[Numpy-discussion] Array views

Pauli Virtanen pav@iki...
Sat Mar 26 12:12:22 CDT 2011


On Sat, 26 Mar 2011 13:10:42 -0400, Hugo Gagnon wrote:
[clip]
> 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.

-- 
Pauli Virtanen



More information about the NumPy-Discussion mailing list