SkillAgentSearch skills...

Quaxed

Pre-quaxed libraries for use in multiple dispatch over abstract array types in JAX.

Install / Use

/learn @GalacticDynamics/Quaxed
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1 align='center'> quaxed </h1> <h3 align="center">Pre-<code>Quaxify</code>'ed <code>JAX</code></h3> <p align="center"> <a href="https://pypi.org/project/quaxed/"> <img alt="PyPI: quaxed" src="https://img.shields.io/pypi/v/quaxed?style=flat" /> </a> <a href="https://pypi.org/project/quaxed/"> <img alt="PyPI versions: quaxed" src="https://img.shields.io/pypi/pyversions/quaxed" /> </a> <a href="https://quaxed.readthedocs.io/en/"> <img alt="ReadTheDocs" src="https://img.shields.io/badge/read_docs-here-orange" /> </a> <a href="https://pypi.org/project/quaxed/"> <img alt="quaxed license" src="https://img.shields.io/github/license/GalacticDynamics/quaxed" /> </a> </p> <p align="center"> <a href="https://github.com/GalacticDynamics/quaxed/actions/workflows/ci.yml"> <img alt="CI status" src="https://github.com/GalacticDynamics/quaxed/actions/workflows/ci.yml/badge.svg?branch=main" /> </a> <a href="https://quaxed.readthedocs.io/en/"> <img alt="ReadTheDocs" src="https://readthedocs.org/projects/quaxed/badge/?version=latest" /> </a> <a href="https://codecov.io/gh/GalacticDynamics/quaxed"> <img alt="codecov" src="https://codecov.io/gh/GalacticDynamics/quaxed/graph/badge.svg" /> </a> <a href="https://scientific-python.org/specs/spec-0000/"> <img alt="ruff" src="https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038" /> </a> <a href="https://docs.astral.sh/ruff/"> <img alt="ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json" /> </a> <a href="https://pre-commit.com"> <img alt="pre-commit" src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit" /> </a> </p>

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

Installation

PyPI version PyPI platforms

<!-- [![Conda-Forge][conda-badge]][conda-link] -->
pip install quaxed

Note that quaxed builds a typing stub file during the build process to provide type hints for some quaxified libraries (e.g., quaxed.numpy). This enables quaxed functions to be typed correctly when working with custom array-like objects. If you find inconsistencies or issues with the type hints or stub files, we recommend using uv to set up your development environment and pin the versions of quaxed and its dependencies.

Documentation

Read The Docs

Quick Start

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 jnp  # this is quaxify(jax.numpy)

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

Development

Actions Status Documentation Status codecov SPEC 0 — Minimum Supported Dependencies pre-commit ruff

We welcome contributions!

Running Tests

To run tests locally, you'll need to install nox with nox-uv:

uv tool install --with nox-uv nox

Then you can run the test suite:

nox -s test

Or run linting:

nox -s lint

The quaxed.numpy module uses automatically generated type stubs. These are typically generated during package installation, but if you need to regenerate them (e.g., after updating JAX), pass the --remake-stubs flag:

nox -s lint -- --remake-stubs
nox -s test -- --remake-stubs

Citation

DOI

If you found this library to be useful and want to support the development and maintenance of lower-level utility libraries for the scientific community, please consider citing this work.

<!-- prettier-ignore-start --> <!-- prettier-ignore-end -->

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated15h ago
Forks3

Languages

Python

Security Score

90/100

Audited on Mar 27, 2026

No findings