From 472b152fdaad523b451410165f126b473f6de0df Mon Sep 17 00:00:00 2001 From: Sayed Adel Date: Tue, 10 Nov 2020 16:16:50 +0000 Subject: ENH: add new function `_opt_info()` to utils provides the optimization info of NumPy build --- numpy/_pytesttester.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'numpy/_pytesttester.py') 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')) -- cgit v1.2.1