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

Method test_log10

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

Source from the content-addressed store, hash-verified

966 self.assertTrue(np.allclose(result, expected))
967
968 def test_log10(self):
969 a = mx.array([0.1, 1, 10, 20, 100])
970 result = mx.log10(a)
971 expected = np.log10(a, dtype=np.float32)
972
973 self.assertTrue(np.allclose(result, expected))
974
975 a = mx.array(1.0) + 1j * mx.array(2.0)
976 result = mx.log10(a)
977 expected = np.log10(np.array(a))
978 self.assertTrue(np.allclose(result, expected))
979
980 def test_exp(self):
981 a = mx.array([0, 0.5, -0.5, 5])

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected