MCPcopy
hub / github.com/tinygrad/tinygrad / test_basic

Method test_basic

test/unit/test_callify.py:5–10  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3
4class 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)

Callers

nothing calls this directly

Calls 3

TensorClass · 0.90
callifyMethod · 0.80
tolistMethod · 0.45

Tested by

no test coverage detected