MCPcopy
hub / github.com/pydata/xarray / test_reindex

Method test_reindex

xarray/tests/test_dask.py:614–626  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

612 self.assertLazyAndAllClose(expected, actual)
613
614 def test_reindex(self):
615 u = self.eager_array.assign_coords(y=range(6))
616 v = self.lazy_array.assign_coords(y=range(6))
617
618 kwargs_list: list[dict[str, Any]] = [
619 {"x": [2, 3, 4]},
620 {"x": [1, 100, 2, 101, 3]},
621 {"x": [2.5, 3, 3.5], "y": [2, 2.5, 3]},
622 ]
623 for kwargs in kwargs_list:
624 expected = u.reindex(**kwargs)
625 actual = v.reindex(**kwargs)
626 self.assertLazyAndAllClose(expected, actual)
627
628 def test_to_dataset_roundtrip(self):
629 u = self.eager_array

Callers

nothing calls this directly

Calls 3

assertLazyAndAllCloseMethod · 0.95
assign_coordsMethod · 0.45
reindexMethod · 0.45

Tested by

no test coverage detected