(self)
| 3 | |
| 4 | class TestCallify(unittest.TestCase): |
| 5 | def test_basic(self): |
| 6 | a = Tensor([1.,2,3]) |
| 7 | b = Tensor([4.,5,6]) |
| 8 | out = a + b |
| 9 | out.callify() |
| 10 | self.assertListEqual(out.tolist(), [5.0, 7.0, 9.0]) |
| 11 | |
| 12 | def test_const(self): |
| 13 | out = Tensor(2.0) + Tensor(3.0) |