MCPcopy
hub / github.com/ray-project/ray / test_single_sample

Method test_single_sample

python/ray/data/tests/test_stats.py:2340–2344  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2338 assert t.avg() == pytest.approx(0.27775)
2339
2340 def test_single_sample(self):
2341 t = Timer()
2342 t.add(0.042)
2343 for p in [0.0, 0.5, 0.9, 1.0]:
2344 assert t.percentile(p) == pytest.approx(0.042)
2345
2346 @pytest.mark.parametrize("p", [0.5, 0.9, 0.99])
2347 def test_uniform_samples(self, p):

Callers

nothing calls this directly

Calls 3

addMethod · 0.95
percentileMethod · 0.95
TimerClass · 0.90

Tested by

no test coverage detected