[Numpy-tickets] [NumPy] #350: Poor wording of exception string: "invalid encountered in sqrt"

NumPy numpy-tickets at scipy.net
Tue Oct 17 10:15:54 CDT 2006


#350: Poor wording of exception string: "invalid encountered in sqrt"
-------------------------+--------------------------------------------------
 Reporter:  edschofield  |       Owner:  somebody   
     Type:  defect       |      Status:  new        
 Priority:  low          |   Milestone:  1.0 Release
Component:  Other        |     Version:             
 Severity:  trivial      |    Keywords:             
-------------------------+--------------------------------------------------
 This exception string is poorly worded:

 {{{
 >>> import numpy
 >>> numpy.seterr(invalid='raise')
 >>> numpy.sqrt(-1)
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
 FloatingPointError: invalid encountered in sqrt
 }}}

 Perhaps 'invalid value encountered' would be better -- or, better,
 'negative value encountered' if this is only raised with negative values.

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/350>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list