2010/4/2 Shailendra :
x=arange(10)
indices=[(1,),(2,)]
x[indices]
> Traceback (most recent call last):
> File "", line 1, in
> IndexError: unsupported iterator index
I have more odd things to report (numpy 1.4.0):
>>> b = numpy.asarray([[1, 2], [3, 4]])
>>> b[[(0, 0)]]
array([[1,
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],
[2, 3],
[4, 5],
[6, 7],
[8, 9]])
>>> indices