Installation¶
Requirements¶
- Python 3.10 or later (3.15 is supported at the release-candidate stage)
- NumPy ≥ 1.26, SciPy ≥ 1.13 (pulled in automatically)
Python 3.15: support currently covers the
numpyand CPUjaxbackends. Dependency markers omit PyTorch, numba, RAPIDS, and pyarrow on this interpreter; requesting an extra does not make those backends available. Thecudaextra still requests JAX CUDA packages on Linux, but that GPU configuration has not been validated on 3.15. The locked pandas version builds from source and needs a C compiler. Thetypecheckextra uses a beartype 0.23 release candidate.
pip¶
uv¶
TestPyPI development snapshots¶
Development builds are published to TestPyPI with VCS-derived versions such as
0.2.1.devN after the v0.2.0 release.
pip¶
pip install --pre \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
fast-vollib
uv¶
uv pip install --pre \
--index https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
fast-vollib
Use the normal PyPI channel if you want stable tagged releases only.
Optional extras¶
fast-vollib ships optional extras for GPU and alternate numeric backends.
PyTorch backend¶
JAX backend¶
Numba backend¶
Runtime type checking (optional)¶
Opt-in shape-aware checking of the public API via jaxtyping + beartype.
Annotations are already present in the library (PEP 563 strings, zero cost
by default); installing this extra only enables the install_import_hook
used by fast_vollib._typing.enable_runtime_checks().
See API Reference → Runtime type checking for usage.
Multiple backends¶
GPU (Linux only — CUDA 13)¶
Installs PyTorch from the CUDA 13.0 wheel index plus JAX with CUDA 13 support:
Note: The
cudaextra is Linux-only and requires a CUDA 13.x-capable GPU and driver.
Development install¶
Clone the repository and install with all optional groups:
git clone https://github.com/raeidsaqur/fast-vollib.git
cd fast-vollib
# CPU-only (default)
uv sync --all-groups
# Both backends on CPU/MPS (macOS or Linux without CUDA)
uv sync --all-groups --extra torch --extra jax
# GPU (Linux)
uv sync --all-groups --extra cuda
Optional dependency groups¶
| Group | What it installs |
|---|---|
docs |
MkDocs + Material theme for building the documentation site |
bench |
pytest-benchmark and RAPIDS packages for benchmarking |