MCPcopy
hub / github.com/tinygrad/tinygrad / test_double_callify

Method test_double_callify

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

Source from the content-addressed store, hash-verified

90 self.assertListEqual(out.tolist(), [-15.0, -21.0, -27.0])
91
92 def test_double_callify(self):
93 a = Tensor([1.,2,3])
94 b = Tensor([4.,5,6])
95 out = a + b
96 out.callify()
97 out.callify()
98 self.assertListEqual(out.tolist(), [5.0, 7.0, 9.0])
99
100 def test_double_callify_multi_output(self):
101 a = Tensor([1.,2,3])

Callers

nothing calls this directly

Calls 3

TensorClass · 0.90
callifyMethod · 0.80
tolistMethod · 0.45

Tested by

no test coverage detected