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

Method test_sqrt

python/tests/test_ops.py:903–907  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

901 self.assertTrue(np.allclose(result, expected))
902
903 def test_sqrt(self):
904 a = mx.array([0.1, 0.5, 1.0, 10.0])
905 result = mx.sqrt(a)
906 expected = np.sqrt(a, dtype=np.float32)
907 self.assertTrue(np.allclose(result, expected))
908
909 def test_rsqrt(self):
910 a = mx.array([0.1, 0.5, 1.0, 10.0])

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected