[SciPy-user] Re: [SciPy-dev] Scheduled release

Pearu Peterson pearu at scipy.org
Fri Sep 26 02:15:19 EDT 2003


On Thu, 25 Sep 2003, Travis Oliphant wrote:

> I would like feedback on a change I made recently to CVS.   I noticed 
> that LAPACK functions were locking up the interpreter when nans (and/or 
> infs) where in the array sent to the routine.
> 
> Has this behavior been observed before or is it due to use of ATLAS, 
> recently compilation flags etc...

Could you be more specific about which functions cause the hang? 
linalg functions seem to work fine with NaNs here (I didn't update cvs 
tree):

>>> a=array([[1,2],[NaN,4]])
>>> a
array([[ 1.        ,  2.        ],
       [        nan,  4.        ]])
>>> linalg.eigvals(a)
array([              nan+0.j,               nan+0.j])
>>> linalg.inv(a)   
array([[              nan,               nan],
       [              nan,               nan]])
>>> linalg.solve(transpose(a),[1,2])
array([              nan,               nan])
>>> a=array([[1,2],[Inf,4]])
>>> a
array([[  1.00000000e+000,   2.00000000e+000],
       [              inf,   4.00000000e+000]])
>>> linalg.solve(transpose(a),[1,2])
array([ 1.,  0.])
>>> linalg.inv(transpose(a))
array([[ 0. ,  0.5],
       [ 0. ,  0. ]])

I am using ATLAS-3.2.1 here.

Pearu




More information about the SciPy-User mailing list