Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/numpy/__config__.py: 24%
34 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1# This file is generated by numpy's setup.py
2# It contains system_info results at the time of building this package.
3__all__ = ["get_info","show"]
6import os
7import sys
9extra_dll_dir = os.path.join(os.path.dirname(__file__), '.libs')
11if sys.platform == 'win32' and os.path.isdir(extra_dll_dir): 11 ↛ 12line 11 didn't jump to line 12, because the condition on line 11 was never true
12 os.add_dll_directory(extra_dll_dir)
14openblas64__info={'libraries': ['openblas64_', 'openblas64_'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None), ('BLAS_SYMBOL_SUFFIX', '64_'), ('HAVE_BLAS_ILP64', None)], 'runtime_library_dirs': ['/usr/local/lib']}
15blas_ilp64_opt_info={'libraries': ['openblas64_', 'openblas64_'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None), ('BLAS_SYMBOL_SUFFIX', '64_'), ('HAVE_BLAS_ILP64', None)], 'runtime_library_dirs': ['/usr/local/lib']}
16openblas64__lapack_info={'libraries': ['openblas64_', 'openblas64_'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None), ('BLAS_SYMBOL_SUFFIX', '64_'), ('HAVE_BLAS_ILP64', None), ('HAVE_LAPACKE', None)], 'runtime_library_dirs': ['/usr/local/lib']}
17lapack_ilp64_opt_info={'libraries': ['openblas64_', 'openblas64_'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None), ('BLAS_SYMBOL_SUFFIX', '64_'), ('HAVE_BLAS_ILP64', None), ('HAVE_LAPACKE', None)], 'runtime_library_dirs': ['/usr/local/lib']}
19def get_info(name):
20 g = globals()
21 return g.get(name, g.get(name + "_info", {}))
23def show():
24 """
25 Show libraries in the system on which NumPy was built.
27 Print information about various resources (libraries, library
28 directories, include directories, etc.) in the system on which
29 NumPy was built.
31 See Also
32 --------
33 get_include : Returns the directory containing NumPy C
34 header files.
36 Notes
37 -----
38 1. Classes specifying the information to be printed are defined
39 in the `numpy.distutils.system_info` module.
41 Information may include:
43 * ``language``: language used to write the libraries (mostly
44 C or f77)
45 * ``libraries``: names of libraries found in the system
46 * ``library_dirs``: directories containing the libraries
47 * ``include_dirs``: directories containing library header files
48 * ``src_dirs``: directories containing library source files
49 * ``define_macros``: preprocessor macros used by
50 ``distutils.setup``
51 * ``baseline``: minimum CPU features required
52 * ``found``: dispatched features supported in the system
53 * ``not found``: dispatched features that are not supported
54 in the system
56 2. NumPy BLAS/LAPACK Installation Notes
58 Installing a numpy wheel (``pip install numpy`` or force it
59 via ``pip install numpy --only-binary :numpy: numpy``) includes
60 an OpenBLAS implementation of the BLAS and LAPACK linear algebra
61 APIs. In this case, ``library_dirs`` reports the original build
62 time configuration as compiled with gcc/gfortran; at run time
63 the OpenBLAS library is in
64 ``site-packages/numpy.libs/`` (linux), or
65 ``site-packages/numpy/.dylibs/`` (macOS), or
66 ``site-packages/numpy/.libs/`` (windows).
68 Installing numpy from source
69 (``pip install numpy --no-binary numpy``) searches for BLAS and
70 LAPACK dynamic link libraries at build time as influenced by
71 environment variables NPY_BLAS_LIBS, NPY_CBLAS_LIBS, and
72 NPY_LAPACK_LIBS; or NPY_BLAS_ORDER and NPY_LAPACK_ORDER;
73 or the optional file ``~/.numpy-site.cfg``.
74 NumPy remembers those locations and expects to load the same
75 libraries at run-time.
76 In NumPy 1.21+ on macOS, 'accelerate' (Apple's Accelerate BLAS
77 library) is in the default build-time search order after
78 'openblas'.
80 Examples
81 --------
82 >>> import numpy as np
83 >>> np.show_config()
84 blas_opt_info:
85 language = c
86 define_macros = [('HAVE_CBLAS', None)]
87 libraries = ['openblas', 'openblas']
88 library_dirs = ['/usr/local/lib']
89 """
90 from numpy.core._multiarray_umath import (
91 __cpu_features__, __cpu_baseline__, __cpu_dispatch__
92 )
93 for name,info_dict in globals().items():
94 if name[0] == "_" or type(info_dict) is not type({}): continue
95 print(name + ":")
96 if not info_dict:
97 print(" NOT AVAILABLE")
98 for k,v in info_dict.items():
99 v = str(v)
100 if k == "sources" and len(v) > 200:
101 v = v[:60] + " ...\n... " + v[-60:]
102 print(" %s = %s" % (k,v))
104 features_found, features_not_found = [], []
105 for feature in __cpu_dispatch__:
106 if __cpu_features__[feature]:
107 features_found.append(feature)
108 else:
109 features_not_found.append(feature)
111 print("Supported SIMD extensions in this NumPy install:")
112 print(" baseline = %s" % (','.join(__cpu_baseline__)))
113 print(" found = %s" % (','.join(features_found)))
114 print(" not found = %s" % (','.join(features_not_found)))