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.2.1.tar.gz (67.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynajax-0.2.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynajax-0.2.1.tar.gz
  • Upload date:
  • Size: 67.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pynajax-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4cf2e2eaad92b6a399c0b7dadac454f3d70660feb75cdefaed13ca180a24f9ad
MD5 f19bd85b064fe5f4b40187256d6d73bf
BLAKE2b-256 c445d9e31a3677a148514ae7196e20481cb5d5b7ad78104416d738084aadf596

See more details on using hashes here.

Provenance

The following attestation bundles were made for pynajax-0.2.1.tar.gz:

Publisher: deploy.yml on pynapple-org/pynajax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pynajax-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pynajax-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c716cbf7633f9060b1e5cdba23a83ff47fcc5eaa2e1935cf02986acaf117e22
MD5 b103b84beb2f15e8e03c08da186073fa
BLAKE2b-256 5441a5dfd6b65610b4f6f674ce3ee3e9204958ba1e604bac9d438414473af02b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pynajax-0.2.1-py3-none-any.whl:

Publisher: deploy.yml on pynapple-org/pynajax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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