diff options
author | Matthew Badin <mbadin@apple.com> | 2021-04-30 14:03:55 -0700 |
---|---|---|
committer | Matthew Badin <mbadin@apple.com> | 2021-04-30 14:03:55 -0700 |
commit | ee56322f91788c97d4a41fdf4ae66aa45310553c (patch) | |
tree | 54fa69ea8865c6d48818d147e976f44d60daaca3 /numpy | |
parent | e28da7a3d50862fa99b8b704d60fc6543b5af631 (diff) | |
download | numpy-ee56322f91788c97d4a41fdf4ae66aa45310553c.tar.gz |
BLD: Address lint issues and reviewer comments.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/_build_utils/README | 9 | ||||
-rw-r--r-- | numpy/_build_utils/__init__.py | 0 | ||||
-rw-r--r-- | numpy/_build_utils/apple_accelerate.py | 21 | ||||
-rw-r--r-- | numpy/core/setup.py | 4 | ||||
-rw-r--r-- | numpy/core/tests/test_multiarray.py | 2 | ||||
-rw-r--r-- | numpy/distutils/system_info.py | 6 |
6 files changed, 5 insertions, 37 deletions
diff --git a/numpy/_build_utils/README b/numpy/_build_utils/README deleted file mode 100644 index 73d93593e..000000000 --- a/numpy/_build_utils/README +++ /dev/null @@ -1,9 +0,0 @@ -======= -WARNING -======= - -This directory (numpy/_build_utils) is *not* part of the public numpy API, - - it is internal build support for numpy. - - it is only present in source distributions or during an in place build - - it is *not* installed with the rest of numpy - diff --git a/numpy/_build_utils/__init__.py b/numpy/_build_utils/__init__.py deleted file mode 100644 index e69de29bb..000000000 --- a/numpy/_build_utils/__init__.py +++ /dev/null diff --git a/numpy/_build_utils/apple_accelerate.py b/numpy/_build_utils/apple_accelerate.py deleted file mode 100644 index 8ce54619e..000000000 --- a/numpy/_build_utils/apple_accelerate.py +++ /dev/null @@ -1,21 +0,0 @@ -import os -import sys -import re - -__all__ = ['uses_accelerate_framework'] - -def uses_accelerate_framework(info): - """ Returns True if Accelerate framework is used for BLAS/LAPACK """ - # If we're not building on Darwin (macOS), don't use Accelerate - if sys.platform != "darwin": - return False - # If we're building on macOS, but targeting a different platform, - # don't use Accelerate. - if os.getenv('_PYTHON_HOST_PLATFORM', None): - return False - r_accelerate = re.compile("Accelerate") - extra_link_args = info.get('extra_link_args', '') - for arg in extra_link_args: - if r_accelerate.search(arg): - return True - return False diff --git a/numpy/core/setup.py b/numpy/core/setup.py index f59b67c88..d1229ee8f 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -10,10 +10,6 @@ from os.path import join from numpy.distutils import log from distutils.dep_util import newer from sysconfig import get_config_var - -from numpy._build_utils.apple_accelerate import ( - uses_accelerate_framework - ) from numpy.compat import npy_load_module from setup_common import * # noqa: F403 diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py index 40b435f2e..012dcbc6c 100644 --- a/numpy/core/tests/test_multiarray.py +++ b/numpy/core/tests/test_multiarray.py @@ -6219,7 +6219,7 @@ class TestDot: s = aligned_array((100, 100), 15, np.float32) np.dot(s, m) # this will always segfault if the bug is present - testdata = itertools.product((15,32), (10000,), (200,89), ('C','F')) + testdata = itertools.product((15, 32), (10000,), (200, 89), ('C', 'F')) for align, m, n, a_order in testdata: # Calculation in double precision A_d = np.random.rand(m, n) diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index 082b029d7..7a031bf9e 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -1750,7 +1750,8 @@ class lapack_opt_info(system_info): notfounderror = LapackNotFoundError # List of all known LAPACK libraries, in the default order - lapack_order = ['accelerate', 'mkl', 'openblas', 'flame', 'atlas', 'lapack'] + lapack_order = ['mkl', 'openblas', 'flame', + 'accelerate', 'atlas', 'lapack'] order_env_var_name = 'NPY_LAPACK_ORDER' def _calc_info_accelerate(self): @@ -1926,7 +1927,8 @@ class blas_opt_info(system_info): notfounderror = BlasNotFoundError # List of all known BLAS libraries, in the default order - blas_order = ['accelerate', 'mkl', 'blis', 'openblas', 'atlas', 'blas'] + blas_order = ['mkl', 'blis', 'openblas', + 'accelerate', 'atlas', 'blas'] order_env_var_name = 'NPY_BLAS_ORDER' def _calc_info_accelerate(self): |