GalacticDynamics / quaxed

Pre-`quaxify`d libraries for use in multiple dispatch over abstract array types in JAX.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

quaxed

Actions Status Documentation Status

PyPI version Conda-Forge PyPI platforms

DOI

Quaxed wraps jax libraries (using quax) to enable using those libraries with custom array-ish objects, not only jax arrays.

To understand how quax works it's magic, see quax.quaxify and the tutorials.

To use this library, it's as simple as:

# Import pre-quaxified library
>>> import quaxed.numpy as qnp  # this is quaxify(jax.numpy)

# As an example, let's import an array-ish object
>>> from unxt import Quantity
>>> x = Quantity(2, "km")
>>> qnp.square(w)
Quantity['area'](Array(4, dtype=int64, weak_type=True), unit='km2')

About

Pre-`quaxify`d libraries for use in multiple dispatch over abstract array types in JAX.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%