[Numpy-discussion] isinf raises in inf
John Hunter
jdh2358 at gmail.com
Thu Jul 15 10:54:12 EDT 2010
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
More information about the NumPy-Discussion
mailing list