JAX type stubs with native Pyrefly tensor-shape tracking
Project description
pyrefly-jax-stubs
Native Pyrefly shape types for JAX arrays.
This PEP 561 partial stub package preserves JAX's shipped typing and specializes array-bearing APIs with Pyrefly's SizeTuple, SymVar, and shape syntax:
from jax import Array
from shape_extensions import SizeTuple, SymVar
def rows[N: SymVar](x: Array[[N, 3]]) -> Array[[N]]: ...
def identity[S: SizeTuple](x: Array[S]) -> Array[S]: ...
Pyrefly discovers the installed stubs automatically. APIs not included here continue to use the typing shipped with JAX.
Installation
Install the stubs and Pyrefly as development dependencies:
uv add --dev pyrefly==1.2.0.dev2 pyrefly-jax-stubs==0.10.2.1
The package requires Python 3.13 or newer because its signatures use type-parameter defaults. Release 0.10.2.1 targets JAX 0.10.2 and is tested with Pyrefly 1.2.0.dev2.
Development
A local checkout can be checked and built with:
uv sync
just lint
just test
just build
The copied and adapted JAX declarations retain their original copyright notices and remain under the Apache License 2.0.
Versioning
Releases use <jax-version>.<stub-revision>. The package pins JAX exactly so an upstream API change cannot silently invalidate the overlay.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrefly_jax_stubs-0.10.2.1.tar.gz.
File metadata
- Download URL: pyrefly_jax_stubs-0.10.2.1.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93d82c4583b2ab1814ffa2fe289c1aa0ec47db67449149c24ca9168c8d6ccdd7
|
|
| MD5 |
1695b6a0a3e75f4fc9e92732b6d28a3f
|
|
| BLAKE2b-256 |
0fa0bf3e9b5e07a83b2835546e673d4ebe84ce6a23b4e925577e414000b0b543
|
Provenance
The following attestation bundles were made for pyrefly_jax_stubs-0.10.2.1.tar.gz:
Publisher:
release.yml on bdelwood/pyrefly-jax-stubs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrefly_jax_stubs-0.10.2.1.tar.gz -
Subject digest:
93d82c4583b2ab1814ffa2fe289c1aa0ec47db67449149c24ca9168c8d6ccdd7 - Sigstore transparency entry: 2221817343
- Sigstore integration time:
-
Permalink:
bdelwood/pyrefly-jax-stubs@2bff19db11c86b5386bc6e37f346d3d81e401977 -
Branch / Tag:
refs/tags/v0.10.2.1 - Owner: https://github.com/bdelwood
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2bff19db11c86b5386bc6e37f346d3d81e401977 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrefly_jax_stubs-0.10.2.1-py3-none-any.whl.
File metadata
- Download URL: pyrefly_jax_stubs-0.10.2.1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26374bc89bcbf896246920fc294d2cdba7c819cf87d97007bcf32cbead4b66d9
|
|
| MD5 |
92e4b3172d757167d176267394264412
|
|
| BLAKE2b-256 |
a4f032920d4618c440df0c00ef0d153d77d20f1eaf0a4aa5e415dbfa1fcf6813
|
Provenance
The following attestation bundles were made for pyrefly_jax_stubs-0.10.2.1-py3-none-any.whl:
Publisher:
release.yml on bdelwood/pyrefly-jax-stubs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrefly_jax_stubs-0.10.2.1-py3-none-any.whl -
Subject digest:
26374bc89bcbf896246920fc294d2cdba7c819cf87d97007bcf32cbead4b66d9 - Sigstore transparency entry: 2221817717
- Sigstore integration time:
-
Permalink:
bdelwood/pyrefly-jax-stubs@2bff19db11c86b5386bc6e37f346d3d81e401977 -
Branch / Tag:
refs/tags/v0.10.2.1 - Owner: https://github.com/bdelwood
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2bff19db11c86b5386bc6e37f346d3d81e401977 -
Trigger Event:
push
-
Statement type: