MCPcopy
hub / github.com/tinygrad/tinygrad / test_reduce

Method test_reduce

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

Source from the content-addressed store, hash-verified

78 self.assertListEqual(out.tolist(), [5, 7, 9])
79
80 def test_reduce(self):
81 out = Tensor([1.,2,3,4]).sum()
82 out.callify()
83 self.assertEqual(out.item(), 10.0)
84
85 def test_multiple_ops(self):
86 a = Tensor([1.,2,3])

Callers

nothing calls this directly

Calls 4

TensorClass · 0.90
sumMethod · 0.80
callifyMethod · 0.80
itemMethod · 0.80

Tested by

no test coverage detected