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

Method test_load_from_pickled_np

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

Source from the content-addressed store, hash-verified

1955 self.assertEqual(id(a), orig_id)
1956
1957 def test_load_from_pickled_np(self):
1958 a = np.array([1, 2, 3], dtype=np.int32)
1959 b = pickle.loads(pickle.dumps(a))
1960 self.assertTrue(mx.array_equal(mx.array(a), mx.array(b)))
1961
1962 a = np.array([1.0, 2.0, 3.0], dtype=np.float16)
1963 b = pickle.loads(pickle.dumps(a))
1964 self.assertTrue(mx.array_equal(mx.array(a), mx.array(b)))
1965
1966 def test_multi_output_leak(self):
1967 def fun():

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected