[NumPy-Tickets] [NumPy] #1742: cholesky error ?

NumPy Trac numpy-tickets@scipy....
Fri Feb 11 13:13:12 CST 2011

```#1742: cholesky error ?
---------------------------+------------------------------------------------
Reporter:  pcrs          |       Owner:  pv
Type:  defect        |      Status:  closed
Priority:  normal        |   Milestone:  2.0.0
Component:  numpy.linalg  |     Version:  1.5.1
Resolution:  invalid       |    Keywords:
---------------------------+------------------------------------------------
Changes (by pv):

* status:  new => closed
* resolution:  => invalid

Old description:

> from numpy import *
> from numpy.linalg import cholesky
> a=array([[1.0, 0.0],[0.0, 1.0]])
> k=0.3;
> b=dot(a,array([[cos(k), sin(k)],[-sin(k), cos(k)]]))
> cholesky(b)
> array([[ 0.97741316,  0.        ],
>        [-0.30234932,  0.92947371]])
> dot(c,c.transpose())
> array([[ 0.95533649, -0.29552021],
>        [-0.29552021,  0.95533649]])
> b
> array([[ 0.95533649,  0.29552021],
>        [-0.29552021,  0.95533649]])
> Isn't dot(c,c.transpose()) not supposed to be equal to b? the sign of
> b[0,1] is sign inverted

New description:

{{{
from numpy import *
from numpy.linalg import cholesky
a=array([[1.0, 0.0],[0.0, 1.0]])
k=0.3;
b=dot(a,array([[cos(k), sin(k)],[-sin(k), cos(k)]]))
cholesky(b)
array([[ 0.97741316,  0.        ],
[-0.30234932,  0.92947371]])
dot(c,c.transpose())
array([[ 0.95533649, -0.29552021],
[-0.29552021,  0.95533649]])
b
array([[ 0.95533649,  0.29552021],
[-0.29552021,  0.95533649]])
}}}
Isn't dot(c,c.transpose()) not supposed to be equal to b? the sign of
b[0,1] is sign inverted

--

Comment:

Cholesky decomposition is defined only for hermitian, positive-definite
matrices.
Your matrix `b` is not hermitian.

--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1742#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
```

More information about the NumPy-Tickets mailing list