diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2019-12-02 09:58:07 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-02 09:58:07 -0800 |
| commit | 48481c6e2ed958cd0d30cc0e8d5611c8e68f7df3 (patch) | |
| tree | 11b47b96f71b3d5a65406ff0e1c6fdf6f59da21e /numpy/linalg | |
| parent | 31e8b55f6f2f41f5f69ff4fc135a0689d01c0196 (diff) | |
| parent | d57739d3152c366a43f0d17694e2ea8d5db142d7 (diff) | |
| download | numpy-48481c6e2ed958cd0d30cc0e8d5611c8e68f7df3.tar.gz | |
Merge pull request #15021 from pv/blas64-test
TST: machinery for tests requiring large memory + lapack64 smoketest
Diffstat (limited to 'numpy/linalg')
| -rw-r--r-- | numpy/linalg/tests/test_linalg.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py index 173e81e9c..e1590f1e7 100644 --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -20,8 +20,9 @@ from numpy.linalg.linalg import _multi_dot_matrix_chain_order from numpy.testing import ( assert_, assert_equal, assert_raises, assert_array_equal, assert_almost_equal, assert_allclose, suppress_warnings, - assert_raises_regex, + assert_raises_regex, HAS_LAPACK64, ) +from numpy.testing._private.utils import requires_memory def consistent_subclass(out, in_): @@ -2002,3 +2003,16 @@ def test_unsupported_commontype(): arr = np.array([[1, -2], [2, 5]], dtype='float16') with assert_raises_regex(TypeError, "unsupported in linalg"): linalg.cholesky(arr) + + +@pytest.mark.slow +@pytest.mark.xfail(not HAS_LAPACK64, run=False, + reason="Numpy not compiled with 64-bit BLAS/LAPACK") +@requires_memory(16e9) +def test_blas64_dot(): + n = 2**32 + a = np.zeros([1, n], dtype=np.float32) + b = np.ones([1, 1], dtype=np.float32) + a[0,-1] = 1 + c = np.dot(b, a) + assert_equal(c[0,-1], 1) |
