numnom
A fast MPS file parser for Python, powered by Rust.
- Fast: 745 MB/s throughput on raw MPS text (4.2× faster than SCIP on MIPLIB 2017)
- Zero-copy numpy arrays: model data lands directly in numpy with no extra copies
- Compressed files: reads
.mps.gzwith SIMD-accelerated decompression - Well-tested: 0 failures across all 1065 MIPLIB 2017 instances
Install
pip install numnom
# Optional: scipy.sparse integration
pip install "numnom[scipy]"
Usage
import numnom
model = numnom.parse_file("problem.mps.gz")
print(model.name, model.num_row, "rows,", model.num_col, "cols")
print("Nonzeros:", model.a_matrix.value.size)
# Numpy arrays — zero-copy from Rust
model.col_cost # np.ndarray[float64], shape (num_col,)
model.col_lower # np.ndarray[float64]
model.col_upper # np.ndarray[float64]
model.row_lower # np.ndarray[float64]
model.row_upper # np.ndarray[float64]
model.col_integrality # np.ndarray[uint8] — see numnom.{CONTINUOUS,INTEGER,...}
# CSC sparse matrix
A = model.a_matrix
A.start # np.ndarray[uint32], shape (num_col + 1,)
A.index # np.ndarray[uint32], shape (nnz,)
A.value # np.ndarray[float64], shape (nnz,)
# Names
model.col_names # list[str]
model.row_names # list[str]
scipy.sparse integration
import numnom
model = numnom.parse_file("problem.mps")
A = numnom.to_scipy(model) # scipy.sparse.csc_matrix, shape (num_row, num_col)
Parse from string
mps_text = open("problem.mps").read()
model = numnom.parse_str(mps_text)
Write MPS
numnom.write_file(model, "out.mps")
mps_text = numnom.write_str(model)
Variable type codes
model.col_integrality is a uint8 array; values map to:
| Code | Constant | Meaning |
|---|---|---|
| 0 | numnom.CONTINUOUS |
Continuous |
| 1 | numnom.INTEGER |
Integer |
| 2 | numnom.SEMI_CONTINUOUS |
Semi-continuous |
| 3 | numnom.SEMI_INTEGER |
Semi-integer |
License
Apache-2.0
Metadata
Release files for numnom 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| numnom-0.4.3.tar.gz | 27.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| numnom-0.4.3-cp38-abi3-win_arm64.whl | CPython 3.8 | abi3 | Windows ARM64 | Details |
| numnom-0.4.3-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| numnom-0.4.3-cp38-abi3-musllinux_1_2_x86_64.whl | CPython 3.8 | abi3 | Linux musl 1.2+ x86-64 | Details |
| numnom-0.4.3-cp38-abi3-musllinux_1_2_aarch64.whl | CPython 3.8 | abi3 | Linux musl 1.2+ ARM64 | Details |
| numnom-0.4.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| numnom-0.4.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| numnom-0.4.3-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details |
| numnom-0.4.3-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 3.1 MB
Release files / numnom-0.4.3.tar.gz
| Download URL | numnom-0.4.3.tar.gz |
|---|---|
| Size | 27.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
089ae97a113951343af2379e241f7c5a985caac14b1570a5e630c0e740e466c7
|
|
BLAKE2b-256 checksum How to use checksums |
a2ed7b884e233167fbbe5b9d4a00829729dcc35bbc9eaf0a66cc59d709abede6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / numnom-0.4.3-cp38-abi3-win_arm64.whl
| Download URL | numnom-0.4.3-cp38-abi3-win_arm64.whl |
|---|---|
| Size | 273.7 kB |
| Tags | CPython 3.8 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
bc64ed35d167a8328e7e4c7d6a0f608039972771b3e4ae6b5dbc2862f1db9403
|
|
BLAKE2b-256 checksum How to use checksums |
29bb8384798bb7fc58072dd0c07148c762bedeb2bfed824e37c47617d2d74a81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / numnom-0.4.3-cp38-abi3-win_amd64.whl
| Download URL | numnom-0.4.3-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 289.4 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dec53b1ef0cf76539e0c9229a665e64c779fbed00c2bfcc71c7e63fc37166071
|
|
BLAKE2b-256 checksum How to use checksums |
aadda2644765f7893621b501589b0f595df0de1af7f7106e823097d1ed91d394
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / numnom-0.4.3-cp38-abi3-musllinux_1_2_x86_64.whl
| Download URL | numnom-0.4.3-cp38-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 581.8 kB |
| Tags | CPython 3.8 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d226203e0f24d1ec2b21a8d1585b16a19943eb7932eb6e7d650ba798ca6f0fc4
|
|
BLAKE2b-256 checksum How to use checksums |
dac70ecc9288dc2e4693831edfb66f2bc6b738405e8f5e734bc598343cf71514
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / numnom-0.4.3-cp38-abi3-musllinux_1_2_aarch64.whl
| Download URL | numnom-0.4.3-cp38-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 528.3 kB |
| Tags | CPython 3.8 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a0b54139f36b8ffdcde02d5699cb41e415399d306db09c1276d6ea356ca40e99
|
|
BLAKE2b-256 checksum How to use checksums |
805fc86bcef1131632962530b2f8a4e37edd3d2593413007007d66a8663ad228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / numnom-0.4.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | numnom-0.4.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 370.0 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d4fd275f9f80ca346a6ab220db6b6f4e974795608f5542112f17699a054510ee
|
|
BLAKE2b-256 checksum How to use checksums |
13142aefe09ec15d70f827f791252fd573ef2aea551129bb123d19c77081a771
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / numnom-0.4.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | numnom-0.4.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 350.5 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a9e7224c04f2fb8edc72f95a4a2734772a336610706dd3cd6d22acde23a35942
|
|
BLAKE2b-256 checksum How to use checksums |
8ccb823cdfb58c9ea5b579daba749279e8dd116a60c5ab693e0cebe5eb027f48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / numnom-0.4.3-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | numnom-0.4.3-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 326.3 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e1d6863a910c28d2da24961185cbbe933778c69158b551af4efa32886a6def45
|
|
BLAKE2b-256 checksum How to use checksums |
e28d9957be542659f60820e4dbf3ed04d6cc0f68fac9f260f0c0d14ec274ad06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / numnom-0.4.3-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | numnom-0.4.3-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 357.8 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
15e8a53149a2a9203cf80bafb166689f5a200ec24e6785379411a3039318035b
|
|
BLAKE2b-256 checksum How to use checksums |
68c35b5a0f77ad7518ecf2e35e915bc1979474367707ff75f39acea85444361d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency log