MCPcopy Create free account
hub / github.com/pydata/xarray / test_weighted_var_bool

Function test_weighted_var_bool

xarray/tests/test_weighted.py:459–467  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

457
458
459def test_weighted_var_bool():
460 # https://github.com/pydata/xarray/issues/4074
461 da = DataArray([1, 1])
462 weights = DataArray([True, True])
463 expected = DataArray(0)
464
465 result = da.weighted(weights).var()
466
467 assert_equal(expected, result)
468
469
470@pytest.mark.filterwarnings("error")

Callers

nothing calls this directly

Calls 4

weightedMethod · 0.95
DataArrayClass · 0.90
assert_equalFunction · 0.90
varMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…