(self)
| 7608 | assert_allclose(c, d) |
| 7609 | |
| 7610 | def test_dot_3args(self): |
| 7611 | |
| 7612 | np.random.seed(22) |
| 7613 | f = np.random.random_sample((1024, 16)) |
| 7614 | v = np.random.random_sample((16, 32)) |
| 7615 | |
| 7616 | r = np.empty((1024, 32)) |
| 7617 | if HAS_REFCOUNT: |
| 7618 | orig_refcount = sys.getrefcount(r) |
| 7619 | for i in range(12): |
| 7620 | dot(f, v, r) |
| 7621 | if HAS_REFCOUNT: |
| 7622 | assert_equal(sys.getrefcount(r), orig_refcount) |
| 7623 | r2 = dot(f, v, out=None) |
| 7624 | assert_array_equal(r2, r) |
| 7625 | assert_(r is dot(f, v, out=r)) |
| 7626 | |
| 7627 | v = v[:, 0].copy() # v.shape == (16,) |
| 7628 | r = r[:, 0].copy() # r.shape == (1024,) |
| 7629 | r2 = dot(f, v) |
| 7630 | assert_(r is dot(f, v, r)) |
| 7631 | assert_array_equal(r2, r) |
| 7632 | |
| 7633 | def test_dot_3args_errors(self): |
| 7634 |
nothing calls this directly
no test coverage detected