A JAX backend for pynapple.
Project description
pynajax
Welcome to pynajax
, a GPU accelerated backend for pynapple built on top on jax. It offers a fast acceleration for the core pynapple functions using GPU.
Warning ⚠️ This package is not meant to be used on its own. It should only be used through the pynapple API.
Installation
Run the following pip
command in your virtual environment.
For macOS/Linux users:
pip install pynajax
For Windows users:
python -m pip install pynajax
Alternatively, you can install pynapple and pynajax together.
pip install pynapple[jax]
Basic usage
To use pynajax, you need to change the pynapple backend using nap.nap_config.set_backend
. See the example below :
import pynapple as nap
import numpy as np
nap.nap_config.set_backend("jax")
tsd = nap.Tsd(t=np.arange(100), d=np.random.randn(100))
# This will run on GPU or CPU depending on the jax installation
tsd.convolve(np.ones(11))
Benchmark
This benchmark for the convolve
function was run on a GPU.
See the documentation for others benchmarks.
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
Built Distribution
File details
Details for the file pynajax-0.2.0.tar.gz
.
File metadata
- Download URL: pynajax-0.2.0.tar.gz
- Upload date:
- Size: 65.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 235a6a2c8147c8e564a47e955ee24dd65a3e5857751a8077bbdbafc64351b7b7 |
|
MD5 | 8581a7ab0912b14bdbfe4fff0d28817d |
|
BLAKE2b-256 | c1cf7e18258c5aa9da9b50bd752cd6b9ac1e31578aadc1873338cb145d866ef2 |
File details
Details for the file pynajax-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pynajax-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d9f90b4975c4307aec123163db5080adc5daa2881e53ab828b37d8b23ac7670 |
|
MD5 | 29a475ce5030500cb86a5451ee47512a |
|
BLAKE2b-256 | c1225af24b5c36f8cb134e310666398d0739ff749c74db5e2f6f9f306a592794 |