MCPcopy
hub / github.com/tinygrad/tinygrad / test_data_float32

Method test_data_float32

test/unit/test_tensor_data.py:68–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

66 assert dat.shape == ()
67
68 def test_data_float32(self):
69 a = Tensor([[1,2.5],[3,4]], dtype=dtypes.float32)
70 dat = a.data()
71 assert dat.format == "f"
72 assert dat[0, 1] == 2.5
73
74 @unittest.skip("requires python 3.12")
75 def test_data_float16(self):

Callers

nothing calls this directly

Calls 2

dataMethod · 0.95
TensorClass · 0.90

Tested by

no test coverage detected