(self)
| 2768 | assert ds_noattr.x.attrs == {} |
| 2769 | |
| 2770 | def test_align_scalar_index(self) -> None: |
| 2771 | # ensure that indexes associated with scalar coordinates are not ignored |
| 2772 | # during alignment |
| 2773 | ds1 = Dataset(coords={"x": 0}).set_xindex("x", ScalarIndex) |
| 2774 | ds2 = Dataset(coords={"x": 0}).set_xindex("x", ScalarIndex) |
| 2775 | |
| 2776 | actual = xr.align(ds1, ds2, join="exact") |
| 2777 | assert_identical(actual[0], ds1, check_default_indexes=False) |
| 2778 | assert_identical(actual[1], ds2, check_default_indexes=False) |
| 2779 | |
| 2780 | ds3 = Dataset(coords={"x": 1}).set_xindex("x", ScalarIndex) |
| 2781 | |
| 2782 | with pytest.raises(AlignmentError, match="cannot align objects"): |
| 2783 | xr.align(ds1, ds3, join="exact") |
| 2784 | |
| 2785 | def test_align_multi_dim_index_exclude_dims(self) -> None: |
| 2786 | ds1 = ( |
nothing calls this directly
no test coverage detected