Coder Social home page Coder Social logo

galacticdynamics / quaxed Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 169 KB

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

Home Page: https://quaxed.readthedocs.io/en/latest/

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

Python 100.00%
array array-api ducktyping jax multiple-dispatch

quaxed's Introduction

quaxed

Pre-Quaxify'ed JAX

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

Installation

PyPI platforms PyPI version

pip install quaxed

Documentation

Documentation Status

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

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.

quaxed's People

Contributors

dependabot[bot] avatar nstarman avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

nstarman

quaxed's Issues

Change repo name

The real thing this repo adds is the quax wrapping. The name should better reflect this.

jit where appropriate

Figure out which functions can be jitted (with inline=True to let them be inlined in containing jit).

Add tests

  • unit tests
  • test whether something can be more directly imported from jax.experimental.array_api. In particular, this repo adds jaxtyping + beartype runtime-checking support, which relies on type hints that are not in jax.experimental.array_api.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.