MCPcopy
hub / github.com/tinygrad/tinygrad / test_const

Method test_const

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

Source from the content-addressed store, hash-verified

9 # *** basic functionality ***
10
11 def test_const(self):
12 const = Tensor(2.0)
13 self.assertEqual(const.item(), 2.0)
14
15 def test_copy(self):
16 out = Tensor([1.,2,3])

Callers

nothing calls this directly

Calls 2

itemMethod · 0.95
TensorClass · 0.90

Tested by

no test coverage detected