GeezerVison is showing github.com — TST: fix running the test suite in builds without BLAS/LAPACK · rgommers/numpy@b59da2d
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: numpy/linalg/tests/test_linalg.py +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 21 | 21 | assert_almost_equal, assert_allclose, suppress_warnings, | 22 | 22 | assert_raises_regex, HAS_LAPACK64, IS_WASM | 23 | 23 | ) | | 24 | +try: | | 25 | + import numpy.linalg.lapack_lite | | 26 | +except ImportError: | | 27 | + # May be broken when numpy was built without BLAS/LAPACK present | | 28 | + # If so, ensure we don't break the whole test suite - the `lapack_lite` | | 29 | + # submodule should be removed, it's only used in two tests in this file. | | 30 | + pass | 24 | 31 |
| 25 | 32 |
| 26 | 33 | def consistent_subclass(out, in_): | |
Collapse file Copy file name to clipboardExpand all lines: numpy/linalg/umath_linalg.cpp +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4597,5 +4597,11 @@ PyMODINIT_FUNC PyInit__umath_linalg(void) | 4597 | 4597 | return NULL; | 4598 | 4598 | } | 4599 | 4599 |
| | 4600 | +#ifdef HAVE_BLAS_ILP64 | | 4601 | + PyDict_SetItemString(d, "_ilp64", Py_True); | | 4602 | +#else | | 4603 | + PyDict_SetItemString(d, "_ilp64", Py_False); | | 4604 | +#endif | | 4605 | + | 4600 | 4606 | return m; | 4601 | 4607 | } |
Collapse file Copy file name to clipboardExpand all lines: numpy/testing/_private/utils.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 22 | 22 | from numpy.core import ( | 23 | 23 | intp, float32, empty, arange, array_repr, ndarray, isnat, array) | 24 | 24 | from numpy import isfinite, isnan, isinf | 25 | | -import numpy.linalg.lapack_lite | | 25 | +import numpy.linalg._umath_linalg | 26 | 26 |
| 27 | 27 | from io import StringIO | 28 | 28 |
| @@ -54,7 +54,7 @@ class KnownFailureException(Exception): | 54 | 54 | IS_PYPY = sys.implementation.name == 'pypy' | 55 | 55 | IS_PYSTON = hasattr(sys, "pyston_version_info") | 56 | 56 | HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None and not IS_PYSTON | 57 | | -HAS_LAPACK64 = numpy.linalg.lapack_lite._ilp64 | | 57 | +HAS_LAPACK64 = numpy.linalg._umath_linalg._ilp64 | 58 | 58 |
| 59 | 59 | _OLD_PROMOTION = lambda: np._get_promotion_state() == 'legacy' | 60 | 60 |
| |
|