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

Method test_subtraction

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

Source from the content-addressed store, hash-verified

48 np.testing.assert_array_equal(out, [-1.0, 2.0, 0.0])
49
50 def test_subtraction(self) -> None:
51 x, y = kernel.args("x", "y")
52 sub = kernel.elementwise(x - y)
53 bx = rt.asarray(np.array([5.0, 3.0]))
54 by = rt.asarray(np.array([2.0, 1.0]))
55 out = rt.go(kernel.map(sub, x=bx, y=by)).result().numpy()
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")

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