MCPcopy
hub / github.com/tinygrad/tinygrad / test_cat

Method test_cat

test/test_tiny.py:35–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33 self.assertListEqual(out.tolist(), [2]*16)
34
35 def test_cat(self):
36 out = Tensor.cat(Tensor.ones(8).contiguous(), Tensor.zeros(8).contiguous())
37 self.assertListEqual(out.tolist(), [1]*8+[0]*8)
38
39 def test_sum(self, N=getenv("SUM_N", 256)):
40 out = Tensor.ones(N).contiguous().sum()

Callers

nothing calls this directly

Calls 5

catMethod · 0.80
zerosMethod · 0.80
contiguousMethod · 0.45
onesMethod · 0.45
tolistMethod · 0.45

Tested by

no test coverage detected