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

Method test_std

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

Source from the content-addressed store, hash-verified

832 self.assertEqual(out.item(), float("inf"))
833
834 def test_std(self):
835 x = mx.random.uniform(shape=(5, 5))
836 x_np = np.array(x)
837 self.assertAlmostEqual(mx.std(x).item(), x_np.std().item(), places=6)
838
839 def test_abs(self):
840 a = mx.array([-1.0, 1.0, -2.0, 3.0])

Callers

nothing calls this directly

Calls 2

itemMethod · 0.80
arrayMethod · 0.60

Tested by

no test coverage detected