[SciPy-User] Calling LAPACK function dbdsqr()?
Fri Dec 14 09:54:22 CST 2012
On 14.12.2012 16:38, Jonathan Helmus wrote:
> Not sure if this is portable or is possible on all or even most Scipy
> installs but I can find a pointer to the LAPACK dbdsqr function in the
> clapack/flapack shared library using ctypes on my EDP 7.3.1 rh5 install:
> In : from ctypes import *
> In : import scipy.linalg
> In : lib = CDLL(scipy.linalg.lapack.clapack.__file__)
That will not be cross-platform, but depend on ABI for the Fortran
compiler used on the particular platform. Cross-platform ABI dependency
is a PITA.
CLAPACK is also abandonware, LAPACKE is the current C/C++ interface.
Thus with any recent LAPACK, there will be no clapack in SciPy.
I hope that SciPy at some point could start to use LAPACKE.
Another cross-platform solution is to use the Fortran 2003 ISO C binding
and Cython (i.e. fwrap instead of f2py).
More information about the SciPy-User