Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
Tensor
Class · 0.90
sum
Method · 0.80
callify
Method · 0.80
item
Method · 0.80
Tested by
no test coverage detected