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

Function test_weighted_var_nan

xarray/tests/test_weighted.py:449–456  ·  view source on GitHub ↗
(weights, expected)

Source from the content-addressed store, hash-verified

447 ("weights", "expected"), (([4, 6], 0), ([1, 0], np.nan), ([0, 0], np.nan))
448)
449def test_weighted_var_nan(weights, expected):
450 da = DataArray([np.nan, 2])
451 weights = DataArray(weights)
452 expected = DataArray(expected)
453
454 result = da.weighted(weights).var()
455
456 assert_equal(expected, result)
457
458
459def test_weighted_var_bool():

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…