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

Function test_cumulative_vs_cum

xarray/tests/test_rolling.py:44–49  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

42
43
44def test_cumulative_vs_cum(d) -> None:
45 result = d.cumulative("z").sum()
46 expected = d.cumsum("z")
47 # cumsum drops the coord of the dimension; cumulative doesn't
48 expected = expected.assign_coords(z=result["z"])
49 assert_identical(result, expected)
50
51
52class TestDataArrayRolling:

Callers

nothing calls this directly

Calls 5

assert_identicalFunction · 0.90
sumMethod · 0.45
cumulativeMethod · 0.45
cumsumMethod · 0.45
assign_coordsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…