MCPcopy
hub / github.com/tinygrad/tinygrad / test_plus_int

Method test_plus_int

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

Source from the content-addressed store, hash-verified

25 self.assertListEqual(out.tolist(), [5.0, 7.0, 9.0])
26
27 def test_plus_int(self):
28 out = Tensor([1,2,3], dtype=dtypes.int) + Tensor([4,5,6], dtype=dtypes.int)
29 self.assertListEqual(out.tolist(), [5, 7, 9])
30
31 def test_plus_big(self):
32 out = Tensor.ones(16).contiguous() + Tensor.ones(16).contiguous()

Callers

nothing calls this directly

Calls 2

TensorClass · 0.90
tolistMethod · 0.45

Tested by

no test coverage detected