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

Method test_dataarray_diff_n1

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

Source from the content-addressed store, hash-verified

4205 assert title.endswith("...")
4206
4207 def test_dataarray_diff_n1(self) -> None:
4208 da = DataArray(np.random.randn(3, 4), dims=["x", "y"])
4209 actual = da.diff("y")
4210 expected = DataArray(np.diff(da.values, axis=1), dims=["x", "y"])
4211 assert_equal(expected, actual)
4212
4213 def test_coordinate_diff(self) -> None:
4214 # regression test for GH634

Callers

nothing calls this directly

Calls 4

diffMethod · 0.95
DataArrayClass · 0.90
assert_equalFunction · 0.90
diffMethod · 0.45

Tested by

no test coverage detected