This directory contains the Python reference implementation for the ZeroLocus62 v3.1.1 release of the v3.1 format.
The repository-level overview is in ../README.md, and the canonical format specification is in ../specification.md.
Install the package in editable mode from the repository root:
python -m pip install -e python
Run the Python regression suite:
python -m pytest python/tests
from zerolocus62 import Factor, decode_label, encode_label
label = encode_label([Factor("A", 1, 1)], [[[1]]])
assert label == "1.0"
assert decode_label(label)["summands"] == [[[1]]]One-bundle labels can be used as canonical descriptions of bundles on partial flag varieties even when the bundle is not globally generated, so negative coefficients such as encode_label([Factor("A", 1, 1)], [[[-1]]]) == "1.z220" are valid.