Closed thouis closed 12 years ago
Comment in Trac by atmention:charris, 2009-03-29
The matrix A is not symmetric. Cholesky is for Hermitean positive definite matrices and the numpy version uses the lower triangular part. So the matrix used is actually A = mat('2,3;3,4') which has eigen values:
In [13]: eig(mat('2,3;3,4'))
Out[13]:
(array([-0.16227766, 6.16227766]),
matrix([[-0.81124219, -0.58471028],
[ 0.58471028, -0.81124219]]))
As you can see, the first eigenvalue is -0.16227766 so the matrix isn't positive definite.
Original ticket http://projects.scipy.org/numpy/ticket/1069 Reported 2009-03-29 by trac user chris.flesher, assigned to unknown.
So I tried using the cholesky decomposition using the following example:
This code gives the error that A is not positive semidefinate even though it is. I tried running the same code using numpy 1.0.1 on ubuntu and the code produces the correct answer. This is a pain for me since I am trying to reproduce some MATLAB code in Windows.