[Scipy-tickets] [SciPy] #812: Unifying numpy.linalg and scipy.linalg exceptions for NaN inputs

SciPy scipy-tickets@scipy....
Sat Dec 13 10:24:25 CST 2008


#812: Unifying numpy.linalg and scipy.linalg exceptions for NaN inputs
--------------------------+-------------------------------------------------
 Reporter:  pv            |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  normal        |   Milestone:  0.8     
Component:  scipy.linalg  |     Version:          
 Severity:  normal        |    Keywords:          
--------------------------+-------------------------------------------------
 From #800 by tzito

 ----

 [...] numpy.linalg.eig raises LinAlgError? if the array contains NaNs?
 (lines 590 and 118 in numpy/linalg/linalg.py), whereas scipy.linalg.eig
 raises ValueError? (line 151 in scipy/linalg/decomp.py).

 I find the scipy behaviour more consistent: scipy.linalg.eig uses the
 numpy function asarray_chkfinite to check that the array does not contain
 NaNs?. numpy.linalg.eig uses an _assertFinite function instead, which is
 defined inside numpy/linalg/linalg.py and which is actually not needed.

 There are three possible fixes:

 1. change numpy.linalg.eig so that it uses asarray_chkfinite instead of
 _assertFinite

 2. change scipy.linalg.eig so that it uses a to be defined _assertFinite
 function instead of asarray_chkfinite.

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/812>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list