summaryrefslogtreecommitdiff
path: root/numpy/linalg
diff options
context:
space:
mode:
authorTyler Reddy <tyler.je.reddy@gmail.com>2018-10-16 11:30:39 -0700
committerTyler Reddy <tyler.je.reddy@gmail.com>2018-10-16 11:30:39 -0700
commitc1ee3d86a23aced31e8f3b02ad93dd6509c28e59 (patch)
treee0d593d9a5338420529446353fccb43608b6d23b /numpy/linalg
parentdc9b616828f7eda0a932319a24cd61c3a39598c4 (diff)
downloadnumpy-c1ee3d86a23aced31e8f3b02ad93dd6509c28e59.tar.gz
TST: test multi_dot with 2 arrays
Diffstat (limited to 'numpy/linalg')
-rw-r--r--numpy/linalg/tests/test_linalg.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
index 320d123e7..0e94c2633 100644
--- a/numpy/linalg/tests/test_linalg.py
+++ b/numpy/linalg/tests/test_linalg.py
@@ -1835,6 +1835,14 @@ class TestMultiDot(object):
assert_almost_equal(multi_dot([A, B, C]), A.dot(B).dot(C))
assert_almost_equal(multi_dot([A, B, C]), np.dot(A, np.dot(B, C)))
+ def test_basic_function_with_two_arguments(self):
+ # separate code path with two arguments
+ A = np.random.random((6, 2))
+ B = np.random.random((2, 6))
+
+ assert_almost_equal(multi_dot([A, B]), A.dot(B))
+ assert_almost_equal(multi_dot([A, B]), np.dot(A, B))
+
def test_basic_function_with_dynamic_programing_optimization(self):
# multi_dot with four or more arguments uses the dynamic programing
# optimization and therefore deserve a separate