Re: [Numpy-discussion] Resending: List of indices

2010-04-04 Thread josef . pktd
On Sun, Apr 4, 2010 at 10:05 AM, Shailendra wrote: > On Fri, Apr 2, 2010 at 12:34 PM, Shailendra > wrote: >> Hi All, >> > x=arange(10) > indices=[(1,),(2,)] > x[indices] >> Traceback (most recent call last): >>  File "", line 1, in >> IndexError: unsupported iterator index You are

[Numpy-discussion] Resending: List of indices

2010-04-04 Thread Shailendra
On Fri, Apr 2, 2010 at 12:34 PM, Shailendra wrote: > Hi All, > x=arange(10) indices=[(1,),(2,)] x[indices] > Traceback (most recent call last): >  File "", line 1, in > IndexError: unsupported iterator index > > > But following works. x=x.reshape(5,2) x > array([[0, 1], >