[SciPy-Dev] Expose Lapack for Cython

Sturla Molden sturla.molden at gmail.com
Thu Sep 11 14:22:09 EDT 2014


Gael Varoquaux <gael.varoquaux at normalesup.org> wrote:

> PS: Note that I haven't posted on this list for at least a year. This
> tells you how enthousiastic I am.

Yes, many projects depending on SciPy would benefit from access to SciPy's
LAPACK and BLAS. Having to link BLAS and LAPACK again is a PITA, not to
mention the pain of building ATLAS or OpenBLAS correctly on your own.
Matlab has always provided access to its BLAS and LAPACK for Fortran and C
MEX files. 15 years ago, when I was writing MEX files extensively I used
this option a lot. It takes away a lot of pain... We are only talking about
making LAPACK available for Cython though. C and C++ extension modules
would have to take care of this themselves using the Python C API. Perhaps
we should provide an example on how to do that?

BTW: SciPy already provides access to BLAS and LAPACK for Fortran extension
modules through f2py. This is a fantastic feature, but unfortunately few
seem to be aware of it. Now we are actually just piggybacking the Cython
code on the f2py machinery for this feature. So Pearu Peterson and the
other authors of f2py deserve to be credited.

Sturla




More information about the SciPy-Dev mailing list