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

Method test_dataset_diff_n1_simple

xarray/tests/test_dataset.py:6835–6839  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6833 assert isinstance(transposed.time.to_index(), pd.PeriodIndex)
6834
6835 def test_dataset_diff_n1_simple(self) -> None:
6836 ds = Dataset({"foo": ("x", [5, 5, 6, 6])})
6837 actual = ds.diff("x")
6838 expected = Dataset({"foo": ("x", [0, 1, 0])})
6839 assert_equal(expected, actual)
6840
6841 def test_dataset_diff_n1_label(self) -> None:
6842 ds = Dataset({"foo": ("x", [5, 5, 6, 6])}, {"x": [0, 1, 2, 3]})

Callers

nothing calls this directly

Calls 3

diffMethod · 0.95
DatasetClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected