![](https://secure.gravatar.com/avatar/55f7acf47233a7a98f5eb9dfd0b2d763.jpg?s=120&d=mm&r=g)
From the PEP:
Here's another little piece of the PEP that I feel should be reconsidered. In the absence of a compelling reason to do otherwise, the indices in index arrays should behave just as if one were using that index directly as in index tuple. And, index tuples should match the behaviour Python lists. In other words: alist[i] == anarray[i] == anarray(array([i]))[0] In order to make this equivalence work, both anarray[i] and anarray(array([i])) need to raise index errors when i is too large or too negative. And for consistency this rule should continue to apply when the index is a tuple rather than a simple integer index. This is more or less how numarray works and I think that's the right choice. [However, I did notice that numarray 1.1 produced nonsensical answers when index arrays with values that were too negative, when they were too positive they worked as I would expect and produced an error]. -tim
participants (1)
-
Tim Hochberg