[Numpy-discussion] non-integer index misfeature?

Neal Becker ndbecker2 at gmail.com
Tue Dec 11 11:44:26 EST 2012

I think it's a misfeature that a floating point is silently accepted as an 
index.  I would prefer a warning for:

bins = np.arange (...)

for b in bins:
  w[b] = blah

when I meant:

for ib,b in enumerate (bins):
  w[ib] = blah

More information about the NumPy-Discussion mailing list