(self)
| 6637 | assert_allclose(c, d) |
| 6638 | |
| 6639 | def test_dot_3args(self): |
| 6640 | from numpy.core.multiarray import dot |
| 6641 | |
| 6642 | np.random.seed(22) |
| 6643 | f = np.random.random_sample((1024, 16)) |
| 6644 | v = np.random.random_sample((16, 32)) |
| 6645 | |
| 6646 | r = np.empty((1024, 32)) |
| 6647 | for i in range(12): |
| 6648 | dot(f, v, r) |
| 6649 | if HAS_REFCOUNT: |
| 6650 | assert_equal(sys.getrefcount(r), 2) |
| 6651 | r2 = dot(f, v, out=None) |
| 6652 | assert_array_equal(r2, r) |
| 6653 | assert_(r is dot(f, v, out=r)) |
| 6654 | |
| 6655 | v = v[:, 0].copy() # v.shape == (16,) |
| 6656 | r = r[:, 0].copy() # r.shape == (1024,) |
| 6657 | r2 = dot(f, v) |
| 6658 | assert_(r is dot(f, v, r)) |
| 6659 | assert_array_equal(r2, r) |
| 6660 | |
| 6661 | def test_dot_3args_errors(self): |
| 6662 | from numpy.core.multiarray import dot |
nothing calls this directly
no test coverage detected