Skip to main content

A JAX backend for pynapple.

Project description

pynajax

License: MIT Python version Project Status: Active – The project has reached a stable, usable state and is being actively developed. pynajax CI Coverage Status PyPI - Version

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.

benchmark_convolve

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

pynajax-0.1.2.tar.gz (64.1 kB view details)

Uploaded Source

Built Distribution

pynajax-0.1.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file pynajax-0.1.2.tar.gz.

File metadata

  • Download URL: pynajax-0.1.2.tar.gz
  • Upload date:
  • Size: 64.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pynajax-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e1c4c2bd1f4ba2abaced9fe3eecb7ee32f96208466a78f59eadd5a968eacc316
MD5 6361761a3b6e841f88fcef878e0dda2a
BLAKE2b-256 999dadce346ac0d9e9413615371f1c897c9c43a6dbeddd1c6a31ea440f401e09

See more details on using hashes here.

File details

Details for the file pynajax-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pynajax-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pynajax-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5344a70175fb4b23424de6c4f6b3e12343ac305b89dbe041c5681d4cfebba8f3
MD5 0f6e64b24892aa33b45e34be82da2f12
BLAKE2b-256 73f01f37ec1da21a51085b60858f58fc67a84216e934679415f8491f03858d5a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page