[SciPy-user] differences between numpy.linalg.cholesky and scipy.linalg.cholesky?

Emanuele Olivetti emanuele@relativita....
Wed Jan 9 01:47:48 CST 2008


Dominique Orban wrote:
> On 1/5/08, Emanuele Olivetti <emanuele@relativita.com> wrote:
>   
>> I'm using cholesky decomposition a lot and trying both
>> numpy.linalgcholesky and scipy.linalg.cholesky on
>> hearmitean positive definite matrix. Sometimes I
>> get  """<class 'numpy.linalg.linalg.LinAlgError'>:
>> Matrix is not positive definite -
>> Cholesky decomposition cannot be computed"""
>> when using numpy's cholesky. No problems with
>> scipy's cholesky. Why?
>>     
>
> Could you provide a small example?
>
>   

Currently it is not so easy to provide a simple example. I'm using
Cholesky factorization on 1000x1000 matrix generated from
some large datasets and getting the error few times. But I'll try to
generate one small soon.

Looking in numpy/scipy source code I see that:
- numpy.linalg.cholesky wraps the fortran function "dpotrf"
- scipy.linalg.decomp wraps "potrf"

Which is the difference between 'dpotrf' and 'potrf' ?

Thanks,

Emanuele



More information about the SciPy-user mailing list