linrax
JAX-compatible, simplex method-based linear program solver. As part of the JAX ecosystem, linrax supports
- JIT compilation,
- Automatic Differentiability (forward mode only, currently), and
- GPU parallelization.
linrax is designed for use as a subroutine in a larger JAX pipeline. Its performance excels on smaller problems ($<50$ input variables), and is fully tracable in any of JAX's main transformations. In particular, linrax can solve problems that are specified with linearly dependent constraints, an area where other JAX-based solvers struggle.
Installation
linrax is available on PyPI:
pip install linrax
Hardware Acceleration
linrax supports hardware acceleration via JAX. This package's optional extras cuda12 and cuda13 will enable the use of an nvidia GPU. Alternatively, you may install a JAX acceleration library directly.
# CUDA 12
pip install "jax[cuda12]"
# CUDA 13
pip install "jax[cuda13]"
See the JAX installation guide for further details.
Usage
The interface of linrax is designed to closely mimic that of scipy.linprog.
The public function is
import jax
import jax.numpy as jnp
@partial(jax.jit, static_argnames=[ "unbounded"])
def linprog(
c: jax.Array,
A_ub: jax.Array = jnp.empty((0, 0)),
b_ub: jax.Array = jnp.empty((0,)),
A_eq: jax.Array = jnp.empty((0, 0)),
b_eq: jax.Array = jnp.empty((0,)),
unbounded: bool = False,
) -> Tuple[SimplexStep, SimplexSolutionType]:
...
The SimplexSolutionType contains fields indicating if the problem is feasible or bounded, and a success property to check both simultaneously.
Assuming the problem has solutions, the SimplexStep object describes this solution. In particular, the fields x and fun retrieve the optimal point and objective value, respectively.
Citing
If linrax is useful or relevant to your work, please cite the corresponding paper with this bibtex entry.
@misc{gould2025linraxjaxcompatiblesimplex,
title={linrax: A JAX Compatible, Simplex Method Linear Program Solver},
author={Brendan Gould and Akash Harapanahalli and Samuel Coogan},
year={2025},
eprint={2509.19484},
archivePrefix={arXiv},
primaryClass={eess.SY},
url={https://arxiv.org/abs/2509.19484},
}
Metadata
Release files for linrax 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| linrax-0.3.0.tar.gz | 105.9 kB | Without provenance | Details for linrax-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linrax-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for linrax-0.3.0-py3-none-any.whl |
Total release size: 111.4 kB
Release files / linrax-0.3.0.tar.gz
| Download URL | linrax-0.3.0.tar.gz |
|---|---|
| Size | 105.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c36334ae28ea59afffc6de03470c66c335d7a1f7ee5ac9a1ab8d73558a4bb62
|
|
BLAKE2b-256 checksum How to use checksums |
8b2a001d6ecf4993d6cc47792e22d31a6ea0e72b7abb04899dd84c411c9624dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / linrax-0.3.0-py3-none-any.whl
| Download URL | linrax-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0185c8a561153e4f9f3d8e2e5ba1e6c9304442f4aaeee4e15558052e8cb3dc04
|
|
BLAKE2b-256 checksum How to use checksums |
e4590fa70ea13c29bb675b324e1cf506c3123d76719715a1e851ad007d7dc9c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for linrax 0.3.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.