[Numpy-discussion] Indexing

Stéfan van der Walt stefan@sun.ac...
Fri Apr 17 07:41:52 CDT 2009


Hi Gerry

2009/4/17 Talbot, Gerry <Gerry.Talbot@amd.com>:
> I stumbled across this anomaly, the assignment to ncycle[i][b] fails, yet
> ncycle[:][b] works and the final print works.  Is this a known bug or
> limitation ?  I am running numpy-1.2.1 with python 2.5.4

The fancy indexing (indexing with an array) in ncycle[i] makes a copy,
so you are assigning to a temporary copy which disappears soon after.

Regards
Stéfan


More information about the Numpy-discussion mailing list