[Numpy-discussion] 2 bugs related to isinf and isfinite generate crazy warnings

Charles R Harris charlesr.harris@gmail....
Wed Jun 2 22:13:56 CDT 2010


On Wed, Jun 2, 2010 at 9:00 PM, David <david@silveregg.co.jp> wrote:

> On 06/03/2010 10:11 AM, Eric Firing wrote:
> > http://www.mail-archive.com/numpy-discussion@scipy.org/msg23912.html
> >
> > On some systems--but evidently not for most numpy users, or there would
> > have been a steady stream of screams--the appearance of np.inf in any
> > call to np.isfinite or np.isinf yields this:
> >
> > In [1]:import numpy as np
> >
> > In [2]:np.isinf(np.inf)
> > Warning: invalid value encountered in isinf
> > Out[2]:True
> >
> >
> > This generates streams of warnings if np.isinf or np.isfinite is applied
> > to an array with many inf values.
> >
> > The problem is a combination of two bugs:
> >
> > 1) When building with setup.py, but perhaps not with scons (which I
> > haven't tried yet), NPY_HAVE_DECL_ISFINITE and friends are never
> > defined, even though they should be--this is all on ubuntu 10.4, in my
> > case, and isfinite and isinf most definitely are in math.h.  It looks to
> > me like the only mechanism for defining these is in SConstruct.
>
> Actually, there is a bug in setup.py to detect those for python >= 2.6,
> I have fixed this.
>
>
Beat me to it ;)

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100602/d0d14510/attachment.html 


More information about the NumPy-Discussion mailing list