diff options
author | Sayed Adel <seiko@imavr.com> | 2020-11-10 16:16:50 +0000 |
---|---|---|
committer | Sayed Adel <seiko@imavr.com> | 2021-04-22 23:58:02 +0200 |
commit | 472b152fdaad523b451410165f126b473f6de0df (patch) | |
tree | fbb184060a0cd6949c15169e9c70964cae60afb3 /numpy/_pytesttester.py | |
parent | ec912112407ece5f6269040ffde0a5cffc840e12 (diff) | |
download | numpy-472b152fdaad523b451410165f126b473f6de0df.tar.gz |
ENH: add new function `_opt_info()` to utils provides the optimization info of NumPy build
Diffstat (limited to 'numpy/_pytesttester.py')
-rw-r--r-- | numpy/_pytesttester.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/numpy/_pytesttester.py b/numpy/_pytesttester.py index 813e069a4..acfaa1ca5 100644 --- a/numpy/_pytesttester.py +++ b/numpy/_pytesttester.py @@ -35,25 +35,13 @@ __all__ = ['PytestTester'] def _show_numpy_info(): - from numpy.core._multiarray_umath import ( - __cpu_features__, __cpu_baseline__, __cpu_dispatch__ - ) import numpy as np print("NumPy version %s" % np.__version__) relaxed_strides = np.ones((10, 1), order="C").flags.f_contiguous print("NumPy relaxed strides checking option:", relaxed_strides) - - if len(__cpu_baseline__) == 0 and len(__cpu_dispatch__) == 0: - enabled_features = "nothing enabled" - else: - enabled_features = ' '.join(__cpu_baseline__) - for feature in __cpu_dispatch__: - if __cpu_features__[feature]: - enabled_features += " %s*" % feature - else: - enabled_features += " %s?" % feature - print("NumPy CPU features:", enabled_features) + info = np.lib.utils._opt_info() + print("NumPy CPU features: ", (info if info else 'nothing enabled')) |