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

Robert Kern robert.kern@gmail....
Wed Jan 9 01:58:19 CST 2008


Emanuele Olivetti wrote:
> 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' ?

Most LAPACK subroutines have variants for each type specified by a single-letter 
prefix in front of the subroutine name.

   S = float32
   D = float64
   C = complex64
   Z = complex128

One of the features of f2py, which is used to make scipy.linalg.decomp but not 
numpy.linalg, is that it can have templated interface definitions so one 
declaration will wrap all four variants.

If you call scipy.linalg.cholesky with a float64 array, it will ultimately call 
DPOTRF, too.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


More information about the SciPy-user mailing list