(self)
| 781 | np.asarray(ds) |
| 782 | |
| 783 | def test_get_index(self) -> None: |
| 784 | ds = Dataset({"foo": (("x", "y"), np.zeros((2, 3)))}, coords={"x": ["a", "b"]}) |
| 785 | assert ds.get_index("x").equals(pd.Index(["a", "b"])) |
| 786 | assert ds.get_index("y").equals(pd.Index([0, 1, 2])) |
| 787 | with pytest.raises(KeyError): |
| 788 | ds.get_index("z") |
| 789 | |
| 790 | def test_attr_access(self) -> None: |
| 791 | ds = Dataset( |