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

Method test_erf

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

Source from the content-addressed store, hash-verified

993 self.assertTrue(np.allclose(result, expected, rtol=1e-3, atol=1e-4))
994
995 def test_erf(self):
996 inputs = [-5, 0.0, 0.5, 1.0, 2.0, 10.0]
997 x = mx.array(inputs)
998 expected = np.array([math.erf(i) for i in inputs])
999 self.assertTrue(np.allclose(mx.erf(x), expected))
1000
1001 def test_erfinv(self):
1002 inputs = [-5.0, -1.0, 0.5, 0.0, 0.5, 1.0, 5.0]

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected