jaxellip
Some elliptic integrals in JAX
What it is and what it does
jaxellip fills a gap in JAX's scientific computing stack by providing differentiable, JIT-compatible implementations of three complete elliptic integrals: ellipk, ellipkm1, and ellipe. These functions are available in scipy.special but not in jax.scipy.special, making them incompatible with JAX's autodiff and compilation. The package uses Cephes minimax polynomials (the same method as SciPy) for forward evaluation and custom JVP rules for derivatives, enabling full differentiability in forward mode, reverse mode, and higher-order derivatives like jax.hessian.
The implementation handles numerical edge cases consistently with SciPy—ellipk(1) returns inf, ellipe(1) returns 1, and out-of-domain inputs return NaN. Results are tested against arbitrary-precision mpmath references and validated against scipy.special to about 1e-14 relative accuracy. The package requires only jax as a runtime dependency and supports Python 3.12–3.14.
Use it for:
- Compute elliptic integrals inside JAX-compiled functions (jit, vmap, grad) without leaving the JAX ecosystem.
- Differentiate functions that depend on elliptic integrals using jax.grad, jax.jacobian, or jax.hessian.
- Replace scipy.special calls in numerical code when JIT compilation or autodiff is needed.
- Implement physics or engineering models (e.g., pendulum dynamics, elliptic orbits) with automatic differentiation.
- Build machine learning models that incorporate elliptic integrals as part of a larger differentiable computation graph.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides JAX-compatible implementations of elliptic integrals (ellipk, ellipkm1, ellipe) that are differentiable and JIT-compilable, addressing the gap in jax.scipy.special.
Yes, if you need elliptic integrals inside JAX-compiled or autodiff code. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is MIT-licensed. The 0.1.0 release is recent and tested against mpmath and scipy.special. Install only if you actually use elliptic integrals; otherwise it adds an unnecessary dependency.
Install
jaxellip on PyPI
pip
pip install jaxellipuv
uv add jaxellippoetry
poetry add jaxellipInstalling jaxellip
Before you install
Low friction: pure Python wheel with a single runtime dependency on jax. Active maintenance with a recent release (44 days old) and current Python 3.12–3.14 support.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.
Quickstart
pip install jaxellip
import jaxellip
import jax.numpy as jnp
input_vals = jnp.linspace(-10, 10, 1000)
jaxellip.ellipk(input_vals) # Complete elliptic integral of the first kind
jaxellip.ellipkm1(input_vals) # Complete elliptic integral of the first kind around m=1
jaxellip.ellipe(input_vals) # Complete elliptic integral of the second kind
Verify before relying
- Whether the package is suitable for production use beyond the early 0.1.0 release stage.
- Real-world performance characteristics on different hardware (GPU, TPU) and JAX/XLA versions.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<3.15,>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — jax |
| Maintenance | actively maintained — 44 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 101,503/month — #12,928 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: jaxellip-0.1.0-py3-none-any.whl
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
jaxJAX is a Python library for automatic…
permissive · top 1,000 on PyPI
hankelComputes Hankel transforms and integrals using…
permissive · top 15,000 on PyPI
jaxlibjaxlib is the compiled XLA backend that enables…
permissive · top 5,000 on PyPI
drjaxDrJAX embeds MapReduce programming primitives…
permissive · top 15,000 on PyPI
jaxliejaxlie implements Lie groups (SO2, SE2, SO3,…
permissive · top 15,000 on PyPI
jax-jumpyJax-jumpy provides a unified interface that…
permissive · top 15,000 on PyPI
jax-cuda12-pjrtProvides NVIDIA GPU acceleration for JAX…
permissive · top 15,000 on PyPI
jax-cuda13-pjrtProvides NVIDIA GPU acceleration for JAX…
permissive · top 15,000 on PyPI
klujaxSolves sparse linear systems in JAX using the…
copyleft · top 15,000 on PyPI
numpyroNumPyro is a probabilistic programming library…
permissive · top 15,000 on PyPI