vbjax_dynamics
A JAX-based library for numerical integration of dynamical systems.
Note: This package contains code adapted from vbjax by INS-AMU. The core integration functions in loops.py are derived from vbjax's implementation.
Features
-
ODE Integration: Ordinary Differential Equations
- Efficient loop-based integrators with JIT compilation
- Full support for
jax.vmapfor parallel trajectory computation
-
SDE Integration: Stochastic Differential Equations
make_sde(): Integration with pre-generated noise arraysmake_sde_auto(): Automatic noise generation from random keys- Euler-Maruyama scheme
- Fully reproducible with random seeds
-
DDE Integration: Delay Differential Equations
- Support for fixed delays
- History function interpolation
-
SDDE Integration: Stochastic Delay Differential Equations
- Combined stochastic and delay dynamics
-
Continuation Methods: Parameter continuation for bifurcation analysis
-
Configuration Utilities: Easy control over JAX settings
configure_jax(): Global configurationprecision_context(): Temporary precision changesprint_jax_config(): Diagnostic information
-
JAX-Native:
- JIT compilation for speed
- Automatic differentiation ready
- GPU/TPU compatible
- Pure functional approach
Installation
pip install vbjax_dynamics
For development:
pip install -e ".[dev]"
Quick Start
import jax.numpy as jnp
from jax import random, vmap
from vbjax_dynamics.loops import make_sde_auto
# Define Ornstein-Uhlenbeck process
def drift(x, p):
return -p[0] * x # -theta * x
def diffusion(x, p):
return p[1] # sigma
# Create integrator
dt = 0.01
step, loop = make_sde_auto(dt, drift, diffusion)
# Single trajectory
x0 = 2.0
params = (1.0, 0.5) # (theta, sigma)
n_steps = 1000
key = random.PRNGKey(42)
trajectory = loop(x0, n_steps, params, key)
print(f"Final value: {trajectory[-1]:.4f}")
# Multiple trajectories in parallel with vmap
n_traj = 100
keys = random.split(key, n_traj)
trajectories = vmap(lambda k: loop(x0, n_steps, params, k))(keys)
print(f"Mean: {jnp.mean(trajectories[:, -1]):.4f}")
For more examples, see the examples/ directory.
Documentation
- Examples and Tutorials: Complete guide with detailed examples for ODE, SDE, DDE, and SDDE integration
- Testing Guide: Information about running and writing tests
- Acknowledgments: Credits and attribution
Acknowledgments
This package includes code adapted from vbjax, developed by the Institut de Neurosciences de la Timone (INS-AMU). We are grateful for their work on efficient JAX-based numerical integrators.
License
MIT License
Metadata
Release files for vbjax-dynamics 0.1.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 |
|---|---|---|---|---|
| vbjax_dynamics-0.1.0.tar.gz | 16.0 kB | Without provenance | Details for vbjax_dynamics-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vbjax_dynamics-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for vbjax_dynamics-0.1.0-py3-none-any.whl |
Total release size: 26.7 kB
Release files / vbjax_dynamics-0.1.0.tar.gz
| Download URL | vbjax_dynamics-0.1.0.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fcabb033b2fb21424c0142179e42e0977da46dc5bf7599c2f2cba92434eb25cf
|
|
BLAKE2b-256 checksum How to use checksums |
8f603eef31862736abcd9b1f56ee2a44be60c5c26653d15c7b1c3186c4282054
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / vbjax_dynamics-0.1.0-py3-none-any.whl
| Download URL | vbjax_dynamics-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
628731262ea5b74e18bda1af686796380e81ce35e85aee37e6c7df26a14ebe91
|
|
BLAKE2b-256 checksum How to use checksums |
e3845ae40dd1b01d519725136cd810e1072695663e1af591403f73b64bb3f158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for vbjax-dynamics 0.1.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.