diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2012-01-21 18:12:41 -0800 |
---|---|---|
committer | Mark Wiebe <mwwiebe@gmail.com> | 2012-01-21 18:14:31 -0800 |
commit | e74585da4b5519115995cbca915e69b48370a162 (patch) | |
tree | 56a9499a6d4c894577b60bb4266334bb3dea894a | |
parent | 7d909e34332a2f97250c68b9852298a621368457 (diff) | |
download | numpy-e74585da4b5519115995cbca915e69b48370a162.tar.gz |
TST: Add a test for ticket #2027
-rw-r--r-- | numpy/core/tests/test_einsum.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/core/tests/test_einsum.py b/numpy/core/tests/test_einsum.py index b58890655..fb7ceb0db 100644 --- a/numpy/core/tests/test_einsum.py +++ b/numpy/core/tests/test_einsum.py @@ -491,5 +491,14 @@ class TestEinSum(TestCase): assert_equal(np.einsum('ijklm,ijn,ijn->',a,b,b), np.einsum('ijklm,ijn->',a,b)) + # Issue #2027, was a problem in the contiguous 3-argument + # inner loop implementation + a = np.arange(1, 3) + b = np.arange(1, 5).reshape(2, 2) + c = np.arange(1, 9).reshape(4, 2) + assert_equal(np.einsum('x,yx,zx->xzy', a, b, c), + [[[1, 3], [3, 9], [5, 15], [7, 21]], + [[8, 16], [16, 32], [24, 48], [32, 64]]]) + if __name__ == "__main__": run_module_suite() |