(self)
| 64 | np.testing.assert_array_equal(out, [3.0, 3.0]) |
| 65 | |
| 66 | def test_reverse_ops(self) -> None: |
| 67 | x = kernel.arg("x") |
| 68 | expr = 2.0 * x + 1.0 |
| 69 | spec = kernel.elementwise(expr) |
| 70 | buf = rt.asarray(np.array([3.0, 4.0])) |
| 71 | out = rt.go(kernel.map(spec, x=buf)).result().numpy() |
| 72 | np.testing.assert_array_equal(out, [7.0, 9.0]) |
| 73 | |
| 74 | |
| 75 | class TestMathFunctions: |