MCPcopy Index your code
hub / github.com/YuminosukeSato/ironkernel / test_division

Method test_division

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

Source from the content-addressed store, hash-verified

56 np.testing.assert_array_equal(out, [3.0, 2.0])
57
58 def test_division(self) -> None:
59 x, y = kernel.args("x", "y")
60 div = kernel.elementwise(x / y)
61 bx = rt.asarray(np.array([6.0, 9.0]))
62 by = rt.asarray(np.array([2.0, 3.0]))
63 out = rt.go(kernel.map(div, x=bx, y=by)).result().numpy()
64 np.testing.assert_array_equal(out, [3.0, 3.0])
65
66 def test_reverse_ops(self) -> None:
67 x = kernel.arg("x")

Callers

nothing calls this directly

Calls 7

numpyMethod · 0.80
argsMethod · 0.45
elementwiseMethod · 0.45
asarrayMethod · 0.45
resultMethod · 0.45
goMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected