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

Method test_reduce_scalars

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

Source from the content-addressed store, hash-verified

6351 assert_identical(expected, actual)
6352
6353 def test_reduce_scalars(self) -> None:
6354 ds = Dataset({"x": ("a", [2, 2]), "y": 2, "z": ("b", [2])})
6355 expected = Dataset({"x": 0, "y": 0, "z": 0})
6356 actual = ds.var()
6357 assert_identical(expected, actual)
6358
6359 expected = Dataset({"x": 0, "y": 0, "z": ("b", [0])})
6360 actual = ds.var("a")
6361 assert_identical(expected, actual)
6362
6363 def test_reduce_only_one_axis(self) -> None:
6364 def mean_only_one_axis(x, axis):

Callers

nothing calls this directly

Calls 3

DatasetClass · 0.90
assert_identicalFunction · 0.90
varMethod · 0.45

Tested by

no test coverage detected