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

Method test_conversion

python/tests/test_double.py:290–297  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

288 self.assertTrue(np.allclose(result, expected))
289
290 def test_conversion(self):
291 a = mx.array([1.0, 2.0], mx.float64)
292 b = np.array(a)
293 self.assertTrue(np.array_equal(a, b))
294
295 a = mx.array([1.0, 2.0], mx.float64)
296 b = a.tolist()
297 self.assertEqual(b, [1.0, 2.0])
298
299 def test_linspace(self):
300 with mx.stream(mx.cpu):

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected