MCPcopy
hub / github.com/tinygrad/tinygrad / test_plus

Method test_plus

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

Source from the content-addressed store, hash-verified

21 self.assertListEqual(out.tolist(), [3.0, 7.0])
22
23 def test_plus(self):
24 out = Tensor([1.,2,3]) + Tensor([4.,5,6])
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)

Callers 2

test_beamMethod · 0.95
plusFunction · 0.45

Calls 2

TensorClass · 0.90
tolistMethod · 0.45

Tested by

no test coverage detected