[SciPy-dev] problem with linalg.cholesky?

Andrew Jaffe a.h.jaffe at gmail.com
Tue Nov 29 16:02:11 CST 2005


Hi All,

One more data point: in addition to my problems on OS X, someone else 
has the same issue on Win XP... So it's not OS-specific, but it does 
occur only for some installations.

Perhaps it depends on the underlying BLAS/LAPACK library?

Andrew

Andrew Jaffe wrote:
> hi all,
> 
> (apologies that a similar question has appeared elsewhere...)
> 
> In the newest incarnation of scipy_core, I am having trouble with the
> cholesky(a) routine. Here is some minimal code reproducing the bug  
> (on OS X)
> 
> ------------------------------------------------------------
> from scipy import identity, __core_version__, Float64
> import scipy.linalg as la
> print 'Scipy version: ', __core_version__
> i = identity(4, Float64)
> print 'identity matrix:'
> print i
> 
> print 'about to get cholesky decomposition'
> c = la.cholesky(i)
> print c
> ------------------------------------------------------------
> 
> which gives
> 
> ------------------------------------------------------------
> Scipy version:  0.6.1
> identity matrix:
> [[ 1.  0.  0.  0.]
>   [ 0.  1.  0.  0.]
>   [ 0.  0.  1.  0.]
>   [ 0.  0.  0.  1.]]
> about to get cholesky decomposition
> Traceback (most recent call last):
>    File "/Users/jaffe/Desktop/bad_cholesky.py", line 13, in ?
>      c = la.cholesky(i)
>    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
> python2.4/site-packages/scipy/linalg/basic_lite.py", line 117, in  
> cholesky_decomposition
>      results = lapack_routine('L', n, a, m, 0)
> lapack_lite.LapackError: Parameter a is not contiguous in  
> lapack_lite.dpotrf
> ------------------------------------------------------------
> 
> (The cholesky decomposition in this case should just be the matrix  
> itself; the same error occurs with a complex matrix.)
> 
> 
> Any ideas? Could this have anything to do with _CastCopyAndtranspose  
> in Basic_lite.py? (Since there are few other candidates for anything  
> that actually changes the matrix.)
> 
> Thanks in advance,
> 
> A
> 
> 
> ______________________________________________________________________
> Andrew Jaffe                                    a.jaffe at imperial.ac.uk
> Astrophysics Group                                    +44 207 594-7526
> Blackett Laboratory, Room 1013                    FAX             7541
> Imperial College, Prince Consort Road
> London SW7 2AZ ENGLAND              http://astro.imperial.ac.uk/~jaffe




More information about the Scipy-dev mailing list