Skip to main content

Jumpy is a common backend for NumPy and optionally JAX:

  • If Jax is installed and jax inputs are provided then the jax.numpy function is run
  • If Jax is installed and the function is jitted then the jax.numpy function is run
  • Otherwise the jumpy function returns the NumPy outputs

There are several functions (e.g. vmap, scan) that are available with jax installed.

Jumpy lets you write framework-agnostic code that is easy to debug by running as raw Numpy, but is just as performant as JAX when jitted.

We maintain this repository primarily so to enable writing Gymnasium and PettingZoo wrappers that can be applied to both standard NumPy or hardware accelerated Jax based environments, however this package can be used for many more things.

Installing Jumpy

To install Jumpy from pypi: pip install jax-jumpy[jax] will include jax while pip install jax-jumpy will not include jax.

Alternatively, to install Jumpy from source, clone this repo, cd to it, and then: pip install .

Contributing

Jumpy does not have a complete implementation of all numpy or jax.numpy functions. If you are missing functions then please create an issue or pull request, we will be happy to add them.

In the future, we are interested in adding optional support for PyTorch and looking for pull request to complete this.

Metadata

Release files for jax-jumpy 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jax-jumpy 1.0.0
File Size Uploaded
jax-jumpy-1.0.0.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jax-jumpy 1.0.0
File Interpreter ABI Platform
jax_jumpy-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 39.8 kB

Release files / jax-jumpy-1.0.0.tar.gz

Download URL jax-jumpy-1.0.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
195fb955cc4c2b7f0b1453e3cb1fb1c414a51a407ffac7a51e69a73cb30d59ad
BLAKE2b-256 checksum
How to use checksums
526ab6affff68f172a4c8316d9ab9b7d952e865df15b854f158690991864e0fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release files / jax_jumpy-1.0.0-py3-none-any.whl

Download URL jax_jumpy-1.0.0-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab7e01454bba462de3c4d098e3e585c302a8f06bc36d9182ab4e7e4aa7067c5e
BLAKE2b-256 checksum
How to use checksums
7323338caee543d80584916da20f018aeb017764509d964fd347b97f41f97baa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.0

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page