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

Function test_weighted_quantile_zero_weights

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

Source from the content-addressed store, hash-verified

223
224
225def test_weighted_quantile_zero_weights():
226 da = DataArray([0, 1, 2, 3])
227 weights = DataArray([1, 0, 1, 0])
228 q = 0.75
229
230 result = da.weighted(weights).quantile(q)
231 expected = DataArray([0, 2]).quantile(0.75)
232
233 assert_allclose(expected, result)
234
235
236def test_weighted_quantile_simple():

Callers

nothing calls this directly

Calls 4

weightedMethod · 0.95
DataArrayClass · 0.90
assert_allcloseFunction · 0.90
quantileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…