[Numpy-discussion] isinf raises in inf

Eric Firing efiring@hawaii....
Thu Jul 15 13:11:03 CDT 2010


On 07/15/2010 04:54 AM, John Hunter wrote:
> I am seeing a problem on Solaris since I upgraded to svn HEAD.
> np.isinf does not handle np.inf.  See ipython session below.  I am not
> seeing this problem w/ HEAD on an ubuntu linux box I tested on
>
> In [1]: import numpy as np
>
> In [2]: np.__version__
> Out[2]: '2.0.0.dev8480'
>
> In [3]: x = np.inf
> np.inf    np.info   np.infty
>
> In [3]: x = np.inf
>
> In [4]: np.isinf(x)
> Warning: invalid value encountered in isinf
> Out[4]: True
>
> In [5]: np.seter
> np.seterr      np.seterrcall  np.seterrobj
>
> In [5]: np.seterr(all='raise')
> Out[5]: {'over': 'print', 'divide': 'print', 'invalid': 'print',
> 'under': 'ignore'}
>
> In [6]: np.isinf(x)
> ---------------------------------------------------------------------------
> FloatingPointError                        Traceback (most recent call last)
>
> /home/titan/johnh/<ipython console>
>
> FloatingPointError: invalid value encountered in isinf
>
> In [7]: !uname -a
> SunOS udesktop191 5.10 Generic_139556-08 i86pc i386 i86pc
>
> In [43]: !gcc --version
> gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>
> Posted on tracker:
>
> http://projects.scipy.org/numpy/ticket/1547

John,

This is related to this thread:

http://www.mail-archive.com/numpy-discussion@scipy.org/msg25796.html

The first of the two bugs I noted was fixed; you are seeing the second.

Eric

> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list