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

Method test_hamming_general

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

Source from the content-addressed store, hash-verified

1482 self.assertEqual(a.dtype, mx.float32)
1483
1484 def test_hamming_general(self):
1485 a = mx.hamming(10)
1486 expected = np.hamming(10)
1487 self.assertTrue(np.allclose(a, expected, atol=1e-5))
1488
1489 a = mx.hamming(1)
1490 self.assertEqual(a.item(), 1.0)
1491
1492 a = mx.hamming(0)
1493 self.assertEqual(a.size, 0)
1494 self.assertEqual(a.dtype, mx.float32)
1495
1496 def test_bartlett_general(self):
1497 a = mx.bartlett(10)

Callers

nothing calls this directly

Calls 1

itemMethod · 0.80

Tested by

no test coverage detected