MCPcopy Create free account
hub / github.com/numpy/numpy / test_two_arguments_and_out

Method test_two_arguments_and_out

numpy/linalg/tests/test_linalg.py:2033–2041  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2031 assert_almost_equal(out, np.dot(A, np.dot(B, C)))
2032
2033 def test_two_arguments_and_out(self):
2034 # separate code path with two arguments
2035 A = np.random.random((6, 2))
2036 B = np.random.random((2, 6))
2037 out = np.zeros((6, 6))
2038 ret = multi_dot([A, B], out=out)
2039 assert out is ret
2040 assert_almost_equal(out, A.dot(B))
2041 assert_almost_equal(out, np.dot(A, B))
2042
2043 def test_dynamic_programming_optimization_and_out(self):
2044 # multi_dot with four or more arguments uses the dynamic programming

Callers

nothing calls this directly

Calls 4

multi_dotFunction · 0.90
assert_almost_equalFunction · 0.90
randomMethod · 0.80
dotMethod · 0.80

Tested by

no test coverage detected