Metadata-Version: 2.3
Name: quaxed
Version: 0.4.7
Summary: Array-API JAX compatibility
Project-URL: Homepage, https://github.com/GalacticDynamics/quaxed
Project-URL: Bug Tracker, https://github.com/GalacticDynamics/quaxed/issues
Project-URL: Discussions, https://github.com/GalacticDynamics/quaxed/discussions
Project-URL: Changelog, https://github.com/GalacticDynamics/quaxed/releases
Author-email: Nathaniel Starkman <nstarman@users.noreply.github.com>
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: jax!=0.4.30,>0.4
Requires-Dist: jaxlib!=0.4.30,>0.4
Requires-Dist: plum-dispatch
Requires-Dist: quax>=0.0.3
Provides-Extra: dev
Requires-Dist: furo>=2023.08.17; extra == 'dev'
Requires-Dist: myst-parser>=0.13; extra == 'dev'
Requires-Dist: pytest-cov>=3; extra == 'dev'
Requires-Dist: pytest-github-actions-annotate-failures; extra == 'dev'
Requires-Dist: pytest>=6; extra == 'dev'
Requires-Dist: sphinx-autodoc-typehints; extra == 'dev'
Requires-Dist: sphinx-copybutton; extra == 'dev'
Requires-Dist: sphinx>=7.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo>=2023.08.17; extra == 'docs'
Requires-Dist: myst-parser>=0.13; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
Requires-Dist: sphinx-copybutton; extra == 'docs'
Requires-Dist: sphinx>=7.0; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest-cov>=3; extra == 'test'
Requires-Dist: pytest-github-actions-annotate-failures; extra == 'test'
Requires-Dist: pytest>=6; extra == 'test'
Description-Content-Type: text/markdown

# quaxed

[![Actions Status][actions-badge]][actions-link]
[![Documentation Status][rtd-badge]][rtd-link]

[![PyPI version][pypi-version]][pypi-link]
[![Conda-Forge][conda-badge]][conda-link]
[![PyPI platforms][pypi-platforms]][pypi-link]

[![DOI][zenodo-badge]][zenodo-link]

<!-- [![GitHub Discussion][github-discussions-badge]][github-discussions-link] -->

<!-- SPHINX-START -->

<!-- prettier-ignore-start -->
[actions-badge]:            https://github.com/GalacticDynamics/quaxed/workflows/CI/badge.svg
[actions-link]:             https://github.com/GalacticDynamics/quaxed/actions
[conda-badge]:              https://img.shields.io/conda/vn/conda-forge/quaxed
[conda-link]:               https://github.com/conda-forge/quaxed-feedstock
<!-- [github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
[github-discussions-link]:  https://github.com/GalacticDynamics/quaxed/discussions -->
[pypi-link]:                https://pypi.org/project/quaxed/
[pypi-platforms]:           https://img.shields.io/pypi/pyversions/quaxed
[pypi-version]:             https://img.shields.io/pypi/v/quaxed
[rtd-badge]:                https://readthedocs.org/projects/quaxed/badge/?version=latest
[rtd-link]:                 https://quaxed.readthedocs.io/en/latest/?badge=latest
[zenodo-badge]:             https://zenodo.org/badge/732262318.svg
[zenodo-link]:              https://zenodo.org/doi/10.5281/zenodo.10850521


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

`Quaxed` wraps [jax](https://jax.readthedocs.io/en/latest/) libraries (using
[`quax`](https://docs.kidger.site/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`](https://docs.kidger.site/quax/api/quax/#quax.quaxify) and the
[tutorials](https://docs.kidger.site/quax/examples/custom_rules/).

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

```pycon
# 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')
```
