MCPcopy
hub / github.com/pydata/xarray / test_weighted_sum_of_weights_bool

Function test_weighted_sum_of_weights_bool

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

Source from the content-addressed store, hash-verified

107
108
109def test_weighted_sum_of_weights_bool():
110 # https://github.com/pydata/xarray/issues/4074
111
112 da = DataArray([1, 2])
113 weights = DataArray([True, True])
114 result = da.weighted(weights).sum_of_weights()
115
116 expected = DataArray(2)
117
118 assert_equal(expected, result)
119
120
121@pytest.mark.parametrize("da", ([1.0, 2], [1, np.nan], [np.nan, np.nan]))

Callers

nothing calls this directly

Calls 4

weightedMethod · 0.95
DataArrayClass · 0.90
assert_equalFunction · 0.90
sum_of_weightsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…