()
| 99 | |
| 100 | |
| 101 | def test_alignment(): |
| 102 | ds1 = xr.Dataset({"a": ("x", [1, 2])}, {"x": [0, 1]}) |
| 103 | ds2 = xr.Dataset({"a": ("x", [2, 3]), "b": 4}, {"x": [1, 2]}) |
| 104 | |
| 105 | actual = np.add(ds1, ds2) |
| 106 | expected = xr.Dataset({"a": ("x", [4])}, {"x": [1]}) |
| 107 | assert_identical_(actual, expected) |
| 108 | |
| 109 | with xr.set_options(arithmetic_join="outer"): |
| 110 | actual = np.add(ds1, ds2) |
| 111 | expected = xr.Dataset( |
| 112 | {"a": ("x", [np.nan, 4, np.nan]), "b": np.nan}, coords={"x": [0, 1, 2]} |
| 113 | ) |
| 114 | assert_identical_(actual, expected) |
| 115 | |
| 116 | |
| 117 | def test_kwargs(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…