(shape, chunk)
| 744 | |
| 745 | @pytest.mark.parametrize(("shape", "chunk"), [(20, 10), (50, 10)]) |
| 746 | def test_inv(shape, chunk): |
| 747 | rng = np.random.default_rng(1) |
| 748 | |
| 749 | A = rng.integers(1, 10, (shape, shape)) |
| 750 | dA = da.from_array(A, (chunk, chunk)) |
| 751 | |
| 752 | res = da.linalg.inv(dA) |
| 753 | assert_eq(res, scipy.linalg.inv(A), check_graph=False) |
| 754 | assert_eq(dA.dot(res), np.eye(shape, dtype=float), check_graph=False) |
| 755 | |
| 756 | |
| 757 | def _get_symmat(size): |