4 ms·
Numpy has no Fortran whatsoever
by marmaduke 9y ago
Numpy has no Fortran whatsoever
- jabl 9y agoThe numpy.linalg module depends on LAPACK, which is Fortran. Core numpy depends on BLAS, for which both Fortran and non-Fortran implementations are available.
- marmaduke 9y agoGo to the source, it's called lapacklite and it's C code translated from Fortran https://github.com/numpy/numpy/tree/master/numpy/linalg https://github.com/numpy/numpy/tree/master/numpy/linalg
- jabl 9y agoHmm, seems you're right. Though that seems to be some fallback thing which is used if the real thing isn't found during the build. At least on Ubuntu 16.04 the lapack_lite module links against the real (Fortran) lapack library: % ldd /usr/lib/python3/dist-packages/numpy/linalg/lapack_lite.cpython-35m-x86_64-linux-gnu.so|grep -E 'lapack|fortran' liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007fb619ce7000) libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f5ae0911000)