MCPcopy
hub / github.com/tinygrad/tinygrad / test_from_npy

Method test_from_npy

test/backend/test_multitensor.py:1199–1202  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1197class TestMultiFromUnrenderable(unittest.TestCase):
1198 @needs_second_gpu
1199 def test_from_npy(self):
1200 t = Tensor(np.arange(100, dtype=np.uint32))
1201 ll = t.shard((d0, d1), axis=0) + 1
1202 np.testing.assert_equal(ll.numpy(), np.arange(100)+1)
1203
1204@unittest.skipIf(not_support_multi_device(), "need multi")
1205class TestMultiAssign(unittest.TestCase):

Callers

nothing calls this directly

Calls 5

shardMethod · 0.95
TensorClass · 0.90
arangeMethod · 0.80
assert_equalMethod · 0.80
numpyMethod · 0.45

Tested by

no test coverage detected