[SciPy-user] cholesky decomposition fails

Travis Oliphant oliphant at ee.byu.edu
Mon Oct 31 11:30:08 CST 2005


Chris Fonnesbeck wrote:

>I am trying to change over some of my kalman filtering code over to
>the new scipy, and have run into a failure in the cholesky
>decomposition function in scipy.linalg:
>
>from scipy.linalg import cholesky
>from scipy import array
>
># Very simple decomposition
>cholesky(array([[1,0],[0,1]]))
>
>Using ipython for more debugging information, I get:
>
>  
>
It looks like you are using old scipy.  Or perhaps a combination of old 
and new scipy.  You can't use old scipy on top of newcore.  You have to 
use newscipy which is pretty close to beta stage.

>---------------------------------------------------------------------------
>exceptions.ValueError                                Traceback (most
>recent call last)
>
>/Users/chris/<console>
>
>/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linalg/decomp.py
>in cholesky(a=array([[ 1.,  0.],
>       [ 0.,  1.]]), lower=0, overwrite_a=0)
>    317
>    318     """
>--> 319     a1 = asarray_chkfinite(a)
>        a1 = undefined
>        global asarray_chkfinite = <function asarray_chkfinite at 0x48d570>
>        a = array([[ 1.,  0.],
>       [ 0.,  1.]])
>    320     if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]:
>    321         raise ValueError, 'expected square matrix'
>
>/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy_base/function_base.py
>in asarray_chkfinite(x=array([[ 1.,  0.],
>  
>
This is not the correct file layout for new scipy.  You should be 
running from scipy/base/function_base.py

What did you install and how.  I'm not sure why you are still picking up 
the old scipy, unless you did not install the new scipy along with new 
core.

-Travis




More information about the SciPy-user mailing list