(self)
| 2018 | assert_equal(multi_dot([A1d, B, C, D1d]).shape, ()) |
| 2019 | |
| 2020 | def test_three_arguments_and_out(self): |
| 2021 | # multi_dot with three arguments uses a fast hand coded algorithm to |
| 2022 | # determine the optimal order. Therefore test it separately. |
| 2023 | A = np.random.random((6, 2)) |
| 2024 | B = np.random.random((2, 6)) |
| 2025 | C = np.random.random((6, 2)) |
| 2026 | |
| 2027 | out = np.zeros((6, 2)) |
| 2028 | ret = multi_dot([A, B, C], out=out) |
| 2029 | assert out is ret |
| 2030 | assert_almost_equal(out, A.dot(B).dot(C)) |
| 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 |
nothing calls this directly
no test coverage detected