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

Method test_exp

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

Source from the content-addressed store, hash-verified

978 self.assertTrue(np.allclose(result, expected))
979
980 def test_exp(self):
981 a = mx.array([0, 0.5, -0.5, 5])
982 result = mx.exp(a)
983 expected = np.exp(a, dtype=np.float32)
984
985 self.assertTrue(np.allclose(result, expected))
986
987 def test_expm1(self):
988 a = mx.array([-88, -87, 0, 0.5, -0.5, 5, 87, 88, 89, 90])

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected