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

Method test_coordinate_diff

xarray/tests/test_dataarray.py:4213–4219  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4211 assert_equal(expected, actual)
4212
4213 def test_coordinate_diff(self) -> None:
4214 # regression test for GH634
4215 arr = DataArray(range(0, 20, 2), dims=["lon"], coords=[range(10)])
4216 lon = arr.coords["lon"]
4217 expected = DataArray([1] * 9, dims=["lon"], coords=[range(1, 10)], name="lon")
4218 actual = lon.diff("lon")
4219 assert_equal(expected, actual)
4220
4221 @pytest.mark.parametrize("offset", [-5, 0, 1, 2])
4222 @pytest.mark.parametrize("fill_value, dtype", [(2, int), (dtypes.NA, float)])

Callers

nothing calls this directly

Calls 3

DataArrayClass · 0.90
assert_equalFunction · 0.90
diffMethod · 0.45

Tested by

no test coverage detected