On Wed, Apr 13, 2016 at 4:31 AM, Stephan Hoyer <sho...@gmail.com> wrote:
> On Wed, Apr 13, 2016 at 12:42 AM, Antony Lee <antony....@berkeley.edu> > wrote: > >> (Note that I am suggesting to switch to the new behavior regardless of >> the version of Python.) >> > > I would lean towards making this change only for Python 3. This is > arguably more consistent with Python than changing the behavior on Python > 2.7, too. > > The most obvious way in which a float being surprisingly switched to an > integer could cause silent bugs (rather than noisy TypeErrors) is if the > number is used in division. True division in Python 3 eliminates this risk. > > Generally, I agree with your reasoning. It would be unfortunate to be > stuck with this legacy behavior forever. > > The difference is that Python 3 has looooong ints, (and doesn't have to overflow, AFAICS) what happens with nan? I guess inf would overflow? (nan and inf are preserved with np.round) Josef > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > https://mail.scipy.org/mailman/listinfo/numpy-discussion > >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion