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

Method test_double_keeps_precision

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

Source from the content-addressed store, hash-verified

431 self.assertTrue(np.array_equal(x, xnp))
432
433 def test_double_keeps_precision(self):
434 x = 39.14223403241
435 out = mx.array(x, dtype=mx.float64).item()
436 self.assertEqual(out, x)
437
438 out = mx.array([x], dtype=mx.float64).item()
439 self.assertEqual(out, x)
440
441 def test_construction_from_lists_of_mlx_arrays(self):
442 dtypes = [

Callers

nothing calls this directly

Calls 2

itemMethod · 0.80
arrayMethod · 0.60

Tested by

no test coverage detected