[SciPy-user] cholesky decomposition fails
Chris Fonnesbeck
fonnesbeck at gmail.com
Mon Oct 31 15:43:37 EST 2005
On 10/31/05, Travis Oliphant <oliphant at ee.byu.edu> wrote:
> 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.
Hmm ... I was pretty sure I had eliminated all the old stuff, and was
using my cvs build. Apparently not. I will try again and confirm.
Thanks,
C.
--
Chris Fonnesbeck
Atlanta, GA
More information about the SciPy-User
mailing list