Skip to main content

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

Project description

quaxed

Pre-Quaxify'ed JAX

PyPI: quaxed PyPI versions: quaxed ReadTheDocs quaxed license

CI status ReadTheDocs codecov ruff ruff pre-commit


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

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!

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quaxed-0.10.4.tar.gz (139.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quaxed-0.10.4-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file quaxed-0.10.4.tar.gz.

File metadata

  • Download URL: quaxed-0.10.4.tar.gz
  • Upload date:
  • Size: 139.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quaxed-0.10.4.tar.gz
Algorithm Hash digest
SHA256 8f12df2fc938e39e2a9b809e660a287c6d26c46c700bfcbb5bc2fbd7f1741924
MD5 a0b6de03f2b967be50cd5f494f10d8f7
BLAKE2b-256 be101a8ad41af9e0cee70cedb6091c274a2c466e28df434248ed8adf5ff19198

See more details on using hashes here.

Provenance

The following attestation bundles were made for quaxed-0.10.4.tar.gz:

Publisher: cd.yml on GalacticDynamics/quaxed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quaxed-0.10.4-py3-none-any.whl.

File metadata

  • Download URL: quaxed-0.10.4-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quaxed-0.10.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5153a3aa96969df2c36b6eb31419b794020ecb104202106540020dec0c20b4aa
MD5 23941773ffa8167918df6b22b9b27203
BLAKE2b-256 f00804cae4a2357439dbf0f98ceb60855557ed23739f565fbaccbc2e2c93e9ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for quaxed-0.10.4-py3-none-any.whl:

Publisher: cd.yml on GalacticDynamics/quaxed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page