[Numpy-tickets] [NumPy] #990: SVD fails to converge

NumPy numpy-tickets@scipy....
Sun Feb 1 14:34:54 CST 2009


#990: SVD fails to converge
--------------------------+-------------------------------------------------
 Reporter:  MikeTrumpis   |        Owner:  somebody
     Type:  defect        |       Status:  new     
 Priority:  normal        |    Milestone:  1.3.0   
Component:  numpy.linalg  |      Version:  devel   
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------
Comment (by MikeTrumpis):

 update-- I can't reproduce the error in a Linux environment on the same
 machine. The lapack_lite module is built with:

 numpy version 1.3.0.dev6336
 -llapack -lblas -lcblas -latlas
 lapack/blas atlas 3.9.2

 Looks like the difference is in Mac's Accelerate framework

 Replying to [ticket:990 MikeTrumpis]:
 > I'm running into a "!LinAlgError: SVD did not converge" in both numpy
 and scipy for a given matrix (npy file linked below). The matrix is very
 badly conditioned (but SVD is meant for that).
 >
 > np version 1.3.0.dev6083
 > mac os 10.4, lapack_lite built with -Wl,-framework -Wl,Accelerate
 >
 > I can get results for this matrix using the SVD routines of either
 Matlab or Octave.
 >
 > This is similar to ticket #706, but the solution there (r4914) can't
 help me, since my build doesn't use dlapack_lite.c. Since I can get
 solutions in Matlab and Octave, perhaps there is some post-LAPACK solution
 for numpy too?
 >
 > https://cirl.berkeley.edu/twiki/pub/User/MikeTrumpis/sinc_operator.npy
 >
 > Mike
 > {{{
 > In [156]: [u,s,vt] = np.linalg.svd(snc_op, 1, 1)
 >
 ---------------------------------------------------------------------------
 > LinAlgError                               Traceback (most recent call
 last)
 >
 > /Users/miket/sandbox/trunk/testdata/siemens/<ipython console> in
 <module>()
 >
 > /opt/local/lib/python2.5/site-packages/numpy/linalg/linalg.pyc in svd(a,
 full_matrices, compute_uv)
 >    1024                                  work, lwork, iwork, 0)
 >    1025     if results['info'] > 0:
 > -> 1026         raise LinAlgError, 'SVD did not converge'
 >    1027     s = s.astype(_realType(result_t))
 >    1028     if compute_uv:
 >
 > LinAlgError: SVD did not converge
 >
 > In [157]: [u,s,vt] = sp.linalg.svd(snc_op, full_matrices=1,
 compute_uv=1)
 >
 ---------------------------------------------------------------------------
 > LinAlgError                               Traceback (most recent call
 last)
 >
 > /Users/miket/sandbox/trunk/testdata/siemens/<ipython console> in
 <module>()
 >
 > /opt/local/lib/python2.5/site-packages/scipy/linalg/decomp.pyc in svd(a,
 full_matrices, compute_uv, overwrite_a)
 >     919     else: # 'clapack'
 >     920         raise NotImplementedError,'calling gesdd from %s' %
 (gesdd.module_name)
 > --> 921     if info>0: raise LinAlgError, "SVD did not converge"
 >     922     if info<0: raise ValueError,\
 >     923        'illegal value in %-th argument of internal
 gesdd'%(-info)
 >
 > LinAlgError: SVD did not converge
 > }}}

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


More information about the Numpy-tickets mailing list