(self)
| 3836 | assert_equal(ret1, ret2) |
| 3837 | |
| 3838 | def test_dot(self): |
| 3839 | a = np.array([[1, 0], [0, 1]]) |
| 3840 | b = np.array([[0, 1], [1, 0]]) |
| 3841 | c = np.array([[9, 1], [1, -9]]) |
| 3842 | # function versus methods |
| 3843 | assert_equal(np.dot(a, b), a.dot(b)) |
| 3844 | assert_equal(np.dot(np.dot(a, b), c), a.dot(b).dot(c)) |
| 3845 | |
| 3846 | # test passing in an output array |
| 3847 | c = np.zeros_like(a) |
| 3848 | a.dot(b, c) |
| 3849 | assert_equal(c, np.dot(a, b)) |
| 3850 | |
| 3851 | # test keyword args |
| 3852 | c = np.zeros_like(a) |
| 3853 | a.dot(b=b, out=c) |
| 3854 | assert_equal(c, np.dot(a, b)) |
| 3855 | |
| 3856 | @pytest.mark.parametrize("dtype", [np.half, np.double, np.longdouble]) |
| 3857 | @pytest.mark.skipif(IS_WASM, reason="no wasm fp exception support") |
nothing calls this directly
no test coverage detected