--- id: jax-jumpy version: "1.0.0" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # jax-jumpy — Common backend for Jax or Numpy. License: permissive · Maintenance: active · Downloads: 96.7K/mo ## What it is and what it does Jax-jumpy is a compatibility layer that lets you write code once and run it on either NumPy or JAX depending on what is installed and how the code is called. The core idea is to enable framework-agnostic libraries—particularly reinforcement learning environments like Gymnasium and PettingZoo—to work seamlessly with both standard NumPy arrays and JAX-accelerated versions without code duplication. When you call a jax-jumpy function, it checks whether JAX is available and whether the inputs are JAX arrays or the function is JIT-compiled; if so, it runs the JAX version for acceleration. Otherwise it falls back to NumPy. This design lets you debug with plain NumPy (which is easier to inspect and step through) and deploy with JAX (for hardware acceleration) using the same codebase. The package currently supports a subset of NumPy and JAX functions, with some advanced features like `vmap` and `scan` available only when JAX is installed. Use it for: - Write RL environment wrappers that work with both NumPy and JAX backends without duplicating logic. - Debug numerical code in plain NumPy, then run it accelerated on GPU/TPU via JAX without code changes. - Build libraries that optionally use JAX acceleration when available, falling back gracefully to NumPy. - Implement array operations that automatically dispatch to the fastest available backend at runtime. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Jax-jumpy provides a unified interface that runs NumPy code as-is when JAX is unavailable, and automatically switches to JAX's accelerated backend when JAX is installed and conditions are met (JIT compilation or JAX inputs). Yes, if you are building libraries or environments that need to support both NumPy and JAX users without code duplication. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. Not necessary if you are already committed to a single backend or do not need optional acceleration. ## Install pip install jax-jumpy uv add jax-jumpy poetry add jax-jumpy ## Installing jax-jumpy Before you install: Low friction install with only numpy as a required dependency; jax is optional. Repository is actively maintained with recent commits and no archived status, though the latest release was over a year ago. License in practice: Apache 2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and document any modifications you make. Quickstart: pip install jax-jumpy import jax_jumpy as jp import numpy as np arr = jp.array([1, 2, 3]) result = jp.sum(arr) JAX is optional; without it, jax-jumpy falls back to NumPy. To use JAX acceleration, install with `pip install jax-jumpy[jax]`. Verify before relying: - Coverage of NumPy and JAX function implementations—documentation does not specify which functions are currently supported versus missing. ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 96.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags numpy jax backend abstraction, framework agnostic array library, numpy to jax compatibility layer, conditional jax acceleration, debug numpy run jax production, backend-abstraction, jax-numpy-interop [View on SkillFed](https://skillfed.io/packages/jax-jumpy) · [View on PyPI](https://pypi.org/project/jax-jumpy/)