v1.6.0 — numeric subpackage
Highlights
New gale_shapley_algorithm.numeric subpackage — numpy-backed primitives for large-scale and numerical work. Install with the new numeric extra:
pip install "gale-shapley-algorithm[numeric]"The core package remains zero-dependency; numpy is pulled in only when you opt into this extra.
What's in it
numeric.gs.gale_shapley/men_optimal_gs/women_optimal_gs— fast numpy deferred acceptance onint16rank matricesnumeric.stability.is_stable/find_blocking_pairs/is_stable_batch— single-matching and vectorized stability checksnumeric.lattice.enumerate_stable_matchings— full stable-matching lattice enumeration via batched brute force (n ≤ 10); a rotation-based enumerator that scales past n = 50 is documented as future work
The numeric subpackage is cross-validated against the existing Algorithm / Proposer / Responder API on random instances and ships at 100 % test coverage.
Docs
- README and docs landing page now include a "Numerical / large-scale usage" section with a runnable snippet
- New
examples/numeric_usage.pydemonstrating rank-matrix GS, stability, and lattice enumeration - CHANGELOG updated; CI now installs the
numericextra on every matrix cell
Compatibility
Fully backwards-compatible — no changes to the existing Algorithm / Proposer / Responder / create_matching / check_stability API. Existing code keeps working untouched.
Full changelog: v1.5.7...v1.6.0