Skip to content

Commit 89c80ba

Browse files
authored
Merge pull request numpy#19447 from 1fish2/show_config_docstring
DOC: BLAS/LAPACK linking rules
2 parents e14d47c + 599a72f commit 89c80ba

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ doc/cdoc/build
7676
MANIFEST
7777
.cache
7878
pip-wheel-metadata
79+
.python-version
7980

8081
# Paver generated files #
8182
#########################

numpy/distutils/misc_util.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,6 +2362,30 @@ def show():
23622362
* ``not found``: dispatched features that are not supported
23632363
in the system
23642364
2365+
NumPy BLAS/LAPACK Installation Notes
2366+
------------------------------------
2367+
Installing a numpy wheel (``pip install numpy`` or force it
2368+
via ``pip install numpy --only-binary :numpy: numpy``) includes
2369+
an OpenBLAS implementation of the BLAS and LAPACK linear algebra
2370+
APIs. In this case, ``library_dirs`` reports the original build
2371+
time configuration as compiled with gcc/gfortran; at run time
2372+
the OpenBLAS library is in
2373+
``site-packages/numpy.libs/`` (linux), or
2374+
``site-packages/numpy/.dylibs/`` (macOS), or
2375+
``site-packages/numpy/.libs/`` (windows).
2376+
2377+
Installing numpy from source
2378+
(``pip install numpy --no-binary numpy``) searches for BLAS and
2379+
LAPACK dynamic link libraries at build time as influenced by
2380+
environment variables NPY_BLAS_LIBS, NPY_CBLAS_LIBS, and
2381+
NPY_LAPACK_LIBS; or NPY_BLAS_ORDER and NPY_LAPACK_ORDER;
2382+
or the optional file ``~/.numpy-site.cfg``.
2383+
NumPy remembers those locations and expects to load the same
2384+
libraries at run-time.
2385+
In NumPy 1.21+ on macOS, 'accelerate' (Apple's Accelerate BLAS
2386+
library) is in the default build-time search order after
2387+
'openblas'.
2388+
23652389
Examples
23662390
--------
23672391
>>> import numpy as np

0 commit comments

Comments
 (0)