MCPcopy Create free account
hub / github.com/ml-explore/mlx / test_key

Method test_key

python/tests/test_random.py:23–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 self.assertEqual(y.item(), b.item())
22
23 def test_key(self):
24 k1 = mx.random.key(0)
25 k2 = mx.random.key(0)
26 self.assertTrue(mx.array_equal(k1, k2))
27
28 k2 = mx.random.key(1)
29 self.assertFalse(mx.array_equal(k1, k2))
30
31 def test_key_split(self):
32 key = mx.random.key(0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected