Original ticket http://projects.scipy.org/numpy/ticket/1171 on 2009-07-14 by trac user jguyer, assigned to unknown.
An empty, rank-0 array can be indexed with an empty list:
>>> import numpy as np
>>> a = np.zeros((0,))
>>> a[..., ]
but an empty array of higher rank throws an index error
>>> b = np.zeros((1, 0))
>>> b[..., ]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: invalid index
We have a not-completely-insane reason for wanting the second case to return array(, shape=(1, 0), dtype=float64). At a minimum, it seems the two cases should be consistent.
array(, shape=(1, 0), dtype=float64)
I wonder if this is related to ticket:1169?
I see this on a 10.5.7 Mac, with Python 2.6.2 and NumPy 1.3.0dev and on a Debian etch machine running Python 2.4.4 and NumPy 1.2.1.
@teoliphant wrote on 2009-07-15
I agree with this reasoning. Does someone have a patch?
Milestone changed to Unscheduled by @cournape on 2009-11-25
Fix issue have been fixed by gh-2701 from its description. Can someone close it?