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

Function test_single_element_reduce

tests/python/test_data_model.py:16–20  ·  view source on GitHub ↗

sum and mean on single-element buffer.

()

Source from the content-addressed store, hash-verified

14
15
16def test_single_element_reduce() -> None:
17 """sum and mean on single-element buffer."""
18 buf = rt.asarray(np.array([42.0]))
19 assert rt.go(kernel.sum(buf)).result().scalar() == 42.0
20 assert rt.go(kernel.mean(buf)).result().scalar() == 42.0
21
22
23def test_channel_send_empty_buffer() -> 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