MCPcopy Create free account
hub / github.com/YuminosukeSato/ironkernel / test_mean

Method test_mean

tests/python/test_kernel.py:117–120  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

115 assert total == 4950.0
116
117 def test_mean(self) -> None:
118 buf = rt.asarray(np.arange(100, dtype=np.float64))
119 avg = rt.go(kernel.mean(buf)).result().scalar()
120 assert avg == 49.5
121
122 def test_empty_sum_raises(self) -> None:
123 buf = rt.asarray(np.array([], dtype=np.float64))

Callers

nothing calls this directly

Calls 5

scalarMethod · 0.80
asarrayMethod · 0.45
resultMethod · 0.45
goMethod · 0.45
meanMethod · 0.45

Tested by

no test coverage detected