[NumPy-Tickets] [NumPy] #1572: FloatingPointError: invalid value encountered in isfinite

NumPy Trac numpy-tickets@scipy....
Tue Aug 3 23:27:34 CDT 2010


#1572: FloatingPointError: invalid value encountered in isfinite
-----------------------+----------------------------------------------------
 Reporter:  nwatanabe  |       Owner:  pierregm
     Type:  defect     |      Status:  new     
 Priority:  normal     |   Milestone:          
Component:  numpy.ma   |     Version:          
 Keywords:             |  
-----------------------+----------------------------------------------------
 numpy.ma.log10([0.0]) raises an unexpected FloatingPointError in NumPy
 v1.4.1:

 {{{
 >>> j = numpy.seterr(invalid='ignore')
 >>> numpy.log10(0.0)
 -inf
 >>> numpy.ma.log10([0.0])
 masked_array(data = [--],
              mask = [ True],
        fill_value = 1e+20)

 >>> j = numpy.seterr(invalid='raise')
 >>> numpy.log10(0.0)
 -inf
 >>> numpy.ma.log10([0.0])
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/share/apps/python/2.6.5/lib/python2.6/site-
 packages/numpy/ma/core.py", line 856, in __call__
     m = ~umath.isfinite(result)
 FloatingPointError: invalid value encountered in isfinite
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1572>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list