(self)
| 1774 | assert_identical(actual, expected) |
| 1775 | |
| 1776 | def test_unstack_errors(self): |
| 1777 | v = Variable("z", [0, 1, 2, 3]) |
| 1778 | with pytest.raises(ValueError, match=r"invalid existing dim"): |
| 1779 | v.unstack(foo={"x": 4}) |
| 1780 | with pytest.raises(ValueError, match=r"cannot create a new dim"): |
| 1781 | v.stack(z=("z",)) |
| 1782 | with pytest.raises(ValueError, match=r"the product of the new dim"): |
| 1783 | v.unstack(z={"x": 5}) |
| 1784 | |
| 1785 | def test_unstack_2d(self): |
| 1786 | v = Variable(["x", "y"], [[0, 1], [2, 3]]) |