MCPcopy Index your code
hub / github.com/pydata/xarray / test_2d

Method test_2d

xarray/tests/test_combine.py:171–191  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

169 assert concat_dims == ["x"]
170
171 def test_2d(self):
172 ds0 = Dataset({"x": [0, 1], "y": [10, 20, 30]})
173 ds1 = Dataset({"x": [2, 3], "y": [10, 20, 30]})
174 ds2 = Dataset({"x": [0, 1], "y": [40, 50, 60]})
175 ds3 = Dataset({"x": [2, 3], "y": [40, 50, 60]})
176 ds4 = Dataset({"x": [0, 1], "y": [70, 80, 90]})
177 ds5 = Dataset({"x": [2, 3], "y": [70, 80, 90]})
178
179 expected = {
180 (0, 0): ds0,
181 (1, 0): ds1,
182 (0, 1): ds2,
183 (1, 1): ds3,
184 (0, 2): ds4,
185 (1, 2): ds5,
186 }
187 actual, concat_dims = _infer_concat_order_from_coords(
188 [ds1, ds0, ds3, ds5, ds2, ds4]
189 )
190 assert_combined_tile_ids_equal(expected, actual)
191 assert concat_dims == ["x", "y"]
192
193 def test_no_dimension_coords(self):
194 ds0 = Dataset({"foo": ("x", [0, 1])})

Callers

nothing calls this directly

Calls 3

DatasetClass · 0.90

Tested by

no test coverage detected