()
| 1330 | np.einsum('{}...a{}->{}...a{}'.format(*sp), arr) |
| 1331 | |
| 1332 | def test_overlap(): |
| 1333 | a = np.arange(9, dtype=int).reshape(3, 3) |
| 1334 | b = np.arange(9, dtype=int).reshape(3, 3) |
| 1335 | d = np.dot(a, b) |
| 1336 | # sanity check |
| 1337 | c = np.einsum('ij,jk->ik', a, b) |
| 1338 | assert_equal(c, d) |
| 1339 | # gh-10080, out overlaps one of the operands |
| 1340 | c = np.einsum('ij,jk->ik', a, b, out=b) |
| 1341 | assert_equal(c, d) |
| 1342 | |
| 1343 | def test_einsum_chunking_precision(): |
| 1344 | """Most einsum operations are reductions and until NumPy 2.3 reductions |
nothing calls this directly
no test coverage detected
searching dependent graphs…