[Numpy-discussion] indexing bug?

Jarrod Millman millman at berkeley.edu
Wed Oct 3 14:35:49 EDT 2007


On 10/3/07, Timothy Hochberg <tim.hochberg at ieee.org> wrote:
> As I understand it, the whole point of PEP-357 was to allow the coercion of
> int-like things (numpy.int32 say, or your own private integerish class) to
> be used as indices without also allowing things that aren't integers, but
> that can be coerced to integers (floats for instance) to slip through. So
> yes, I'd say this is a bug. Probably someplace that should be using
> __index__ or the C equivalent is still using __int__, but I haven't had time
> to look.

It seems like a bug to me as well.

> On the other hand, this may well be a bug that people rely on and it's not
> doing drastic immediate harm. So, while I think it should get fixed
> eventually, it's probably fine to wait till 1.1 or whenever the next
> convenient time is.

I don't know that it is essential to fix in the 1.0.x series, but 1.1
is still several months away.  And the longer this "bug" is out there,
the greater the chance that people will write code that depends on it.
 So I would tentatively vote to fix it sooner rather than later.

-- 
Jarrod Millman
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/



More information about the NumPy-Discussion mailing list