Skip to main content

Lint & test PyPI

.. warning:: This version of XAJ works only with jax and jaxlib 0.3. But jaxlib 0.3 is not available on PyPI. To install this version of XAJ, please first install jaxlib with:

.. code-block:: bash
    pip install jaxlib==0.3.25 -f https://storage.googleapis.com/jax-releases/jax_releases.html

XAJ

Ordinary differential equation (ODE) integrator compatible with Google's JAX.

XAJ implements the Runge-Kutta Dormand-Prince 4/5 pair (DP5) with adaptive step control and dense output according to the Numerical Recipes. It provides a fast and efficient way to solve non-stiff ODEs. The programming interface is designed so it feels similar to the derivative functions in JAX.

Specifically, XAJ provides a single function odeint(). Applying it to another function rhs() and the initial conditions returns the numerical solution as a callable ns, which interpolates the dense output.

from xaj import odeint
from jax import numpy as np

rhs = lambda x, y: y
x0  = 0
y0  = 1

ns  = odeint(rhs, x0, y0, 1)

x   = np.linspace(0, 5)
y   = ns(x)

The numerical integration happens in a "lazy" way, which is triggered by the extreme values of the argument of ns. Alternatively, it is possible to obtain the numerical solutions at the full steps by

xs = ns.xs
ys = ns.ys

Demos on how to use XAJ can be found in the demos directory.

Metadata

Release files for xaj 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xaj 0.1.8
File Size Uploaded
xaj-0.1.8.tar.gz 21.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xaj 0.1.8
File Interpreter ABI Platform
xaj-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 46.1 kB

Release files / xaj-0.1.8.tar.gz

Download URL xaj-0.1.8.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
df1a836c50c2377f0ae728161e9ae1416f8b4aaac73fb72b72f4203cb96c5698
BLAKE2b-256 checksum
How to use checksums
3716990707c0c147b2e486776659cbbb1063acc56daba026529d66b1ddd7bf8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / xaj-0.1.8-py3-none-any.whl

Download URL xaj-0.1.8-py3-none-any.whl
Size 24.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eeba1c786862ca5bbbd631bbb95ac042a0d27984e3de7a04ddbd5c1a486a1c0c
BLAKE2b-256 checksum
How to use checksums
15457b41e57d355179e2145d883cca3ae80cb4471d820fb1fcdc993cc6adccbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page