Re: [Numpy-discussion] Deprecating silent truncation of floats when assigned to int array

2016-06-17 Thread Ralf Gommers
On Tue, Jun 14, 2016 at 12:23 AM, Ian Henriksen < insertinterestingnameh...@gmail.com> wrote: > Personally, I think this is a great idea. +1 to more informative errors. > +1 from me as well Ralf > Best, > Ian Henriksen > > On Mon, Jun 13, 2016 at 2:11 PM Nathaniel Smith wrote: > >> It was re

Re: [Numpy-discussion] Deprecating silent truncation of floats when assigned to int array

2016-06-13 Thread Ian Henriksen
Personally, I think this is a great idea. +1 to more informative errors. Best, Ian Henriksen On Mon, Jun 13, 2016 at 2:11 PM Nathaniel Smith wrote: > It was recently pointed out: > > https://github.com/numpy/numpy/issues/7730 > > that this code silently truncates floats: > > In [1]: a = np.ara

[Numpy-discussion] Deprecating silent truncation of floats when assigned to int array

2016-06-13 Thread Nathaniel Smith
It was recently pointed out: https://github.com/numpy/numpy/issues/7730 that this code silently truncates floats: In [1]: a = np.arange(10) In [2]: a.dtype Out[2]: dtype('int64') In [3]: a[3] = 1.5 In [4]: a[3] Out[4]: 1 The proposal is that we should deprecate this, and eventually turn it