MCPcopy Create free account
hub / github.com/DevTechJr/turboquant_cutile / test_symmetry

Function test_symmetry

tests/test_codebook.py:33–37  ·  view source on GitHub ↗
(d, bits)

Source from the content-addressed store, hash-verified

31@pytest.mark.parametrize("d", [64, 128, 256])
32@pytest.mark.parametrize("bits", [2, 3, 4])
33def test_symmetry(d, bits):
34 cb = LloydMaxCodebook(d, bits)
35 assert cb.centroids.sum().abs().item() < 1e-4, (
36 f"Centroids should be symmetric: sum={cb.centroids.sum().item()}"
37 )
38
39
40@pytest.mark.parametrize("bits", [1, 2, 3, 4])

Callers

nothing calls this directly

Calls 1

LloydMaxCodebookClass · 0.90

Tested by

no test coverage detected