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

Function test_reduce_goal_code

tests/python/test_goal_code_v1.py:34–41  ·  view source on GitHub ↗

design.md L97-99: sum and mean.

()

Source from the content-addressed store, hash-verified

32
33
34def test_reduce_goal_code() -> None:
35 """design.md L97-99: sum and mean."""
36 buf = rt.asarray(np.arange(100, dtype=np.float64))
37 total = rt.go(kernel.sum(buf)).result().scalar()
38 avg = rt.go(kernel.mean(buf)).result().scalar()
39
40 assert total == 4950.0
41 assert avg == 49.5
42
43
44def test_channel_handoff_goal_code() -> None:

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected