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

Method test_array_namespace

python/tests/test_array.py:2108–2112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2106 mx.arange(1000).reshape(10, 10, 10)[mask_np] = 0
2107
2108 def test_array_namespace(self):
2109 a = mx.array(1.0)
2110 api = a.__array_namespace__()
2111 self.assertTrue(hasattr(api, "array"))
2112 self.assertTrue(hasattr(api, "add"))
2113
2114 def test_array_namespace_asarray(self):
2115 xp = mx.array(1.0).__array_namespace__()

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected