Re: [Numpy-discussion] numpy log and exceptions

2014-10-22 Thread Nathaniel Smith
On 22 Oct 2014 14:57, "Daπid" wrote: > > > On 22 October 2014 15:43, Nathaniel Smith wrote: >> >> I guess we could make this more consistent by hand if we wanted - isnan is pretty cheap? > > > > Can it be made avoiding storing the full bool array? The 1/8 memory overhead can be problematic for la

Re: [Numpy-discussion] numpy log and exceptions

2014-10-22 Thread Daπid
On 22 October 2014 15:43, Nathaniel Smith wrote: > I guess we could make this more consistent by hand if we wanted - isnan is > pretty cheap? Can it be made avoiding storing the full bool array? The 1/8 memory overhead can be problematic for large arrays. __

Re: [Numpy-discussion] numpy log and exceptions

2014-10-22 Thread Nathaniel Smith
I guess we could make this more consistent by hand if we wanted - isnan is pretty cheap? On 22 Oct 2014 07:44, "Julian Taylor" wrote: > On 22.10.2014 05:52, Daniel Hyams wrote: > > > > I would have thought that this snippet would raise an exception: > > > > import numpy > > numpy.seterr(all='rais

Re: [Numpy-discussion] numpy log and exceptions

2014-10-22 Thread Daniel Hyams
Julian Taylor googlemail.com> writes: > What platform are you using? > whether you get exceptions or not depends on your math library. > Windows 7. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/n

Re: [Numpy-discussion] numpy log and exceptions

2014-10-21 Thread Julian Taylor
On 22.10.2014 05:52, Daniel Hyams wrote: > > I would have thought that this snippet would raise an exception: > > import numpy > numpy.seterr(all='raise') > a = numpy.array([1.0,0.0,-1.0]) > b = numpy.log(a) > > I get as a result (in b): [0, -Inf, NaN] > > It's basically the same issue as: > >

[Numpy-discussion] numpy log and exceptions

2014-10-21 Thread Daniel Hyams
I would have thought that this snippet would raise an exception: import numpy numpy.seterr(all='raise') a = numpy.array([1.0,0.0,-1.0]) b = numpy.log(a) I get as a result (in b): [0, -Inf, NaN] It's basically the same issue as: http://numpy-discussion.10968.n7.nabble.com/numpy-log-does-not-rai