[SciPy-user] Possible bug in linalg.svdvals

Nils Wagner nwagner at mecha.uni-stuttgart.de
Mon Oct 21 09:56:15 EDT 2002


Pearu Peterson schrieb:
> 
> On Mon, 21 Oct 2002, Nils Wagner wrote:
> 
> > Hi,
> >
> > I am interested in the singular values of the following matrix
> >
> > >>> A
> > array([[ 0.  ,  0.  ,  1.  ,  0.  ],
> >        [ 0.  ,  0.  ,  0.  ,  1.  ],
> >        [-0.81,  0.15, -0.02,  0.  ],
> >        [ 0.25, -1.21,  0.  , -0.02]])
> >
> >
> >
> > >>> print svdvals(A)
> > [              nan               nan               nan
> > nan]
> 
> Strange, it works here:
> 
> >>> linalg.svdvals(a)
> array([ 1.29446282,  1.00042554,  0.99970394,  0.72808433])
> 
> when using ATLAS 3.3.14 or 3.4.1 and LAPACK-3.0, ifc or gcc.
> 
> In your case, what ATLAS/LAPACK are you using? Is
> scipy.linalg.test(1) succesful?
> 
> Pearu
> >>> import scipy
>>> scipy.linalg.test(1)
 creating test suite for: scipy.linalg.lapack
 creating test suite for: scipy.linalg.decomp
No test suite found for  scipy.linalg.flinalg
 creating test suite for: scipy.linalg.blas
No test suite found for  scipy.linalg.interface_gen
 creating test suite for: scipy.linalg.matfuncs
   !! FAILURE building test for  scipy.linalg.matfuncs
    <string>:1: ImportError: No module named test_matfuncs (in ?)
 creating test suite for: scipy.linalg.basic
........................................scopy:n=4
..scopy:n=3
....dcopy:n=4
..dcopy:n=3
....ccopy:n=4
..ccopy:n=3
....zcopy:n=4
..zcopy:n=3
.....saxpy:n=4
..saxpy:n=3
.....daxpy:n=4
..daxpy:n=3
.....caxpy:n=4
..caxpy:n=3
.....zaxpy:n=4
..zaxpy:n=3
...sscal:n=4
...dscal:n=4
...cscal:n=4
...zscal:n=4
....sswap:n=4
..sswap:n=3
....dswap:n=4
..dswap:n=3
....cswap:n=4
..cswap:n=3
....zswap:n=4
..zswap:n=3
...................................
----------------------------------------------------------------------
Ran 159 tests in 1.596s

OK
<unittest.TextTestRunner instance at 0x8598e1c>
>>>

Nils


> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user



More information about the SciPy-User mailing list