(self)
| 2676 | assert_identical(expected_y2, y2) |
| 2677 | |
| 2678 | def test_align_nocopy(self) -> None: |
| 2679 | x = Dataset({"foo": DataArray([1, 2, 3], coords=[("x", [1, 2, 3])])}) |
| 2680 | y = Dataset({"foo": DataArray([1, 2], coords=[("x", [1, 2])])}) |
| 2681 | expected_x2 = x |
| 2682 | expected_y2 = Dataset( |
| 2683 | {"foo": DataArray([1, 2, np.nan], coords=[("x", [1, 2, 3])])} |
| 2684 | ) |
| 2685 | |
| 2686 | x2, y2 = align(x, y, copy=False, join="outer") |
| 2687 | assert_identical(expected_x2, x2) |
| 2688 | assert_identical(expected_y2, y2) |
| 2689 | assert source_ndarray(x["foo"].data) is source_ndarray(x2["foo"].data) |
| 2690 | |
| 2691 | x2, y2 = align(x, y, copy=True, join="outer") |
| 2692 | assert source_ndarray(x["foo"].data) is not source_ndarray(x2["foo"].data) |
| 2693 | assert_identical(expected_x2, x2) |
| 2694 | assert_identical(expected_y2, y2) |
| 2695 | |
| 2696 | def test_align_indexes(self) -> None: |
| 2697 | x = Dataset({"foo": DataArray([1, 2, 3], dims="x", coords=[("x", [1, 2, 3])])}) |
nothing calls this directly
no test coverage detected