This release is a pre-release and may not be stable for production use.
Pyrefly JAX shape stubs
This package is a PEP 561 stub-only distribution. It installs the jax-stubs
stub package so Pyrefly can discover shape-aware stubs for the runtime jax
package without replacing or shadowing JAX itself. It is versioned in lockstep
with Pyrefly and depends on the matching pyrefly-shape-extensions package.
Shape-typed fixture stubs for a subset of JAX. This is a starting point for
working with the JAX core team rather than a complete model: it covers array
creation, broadcasting arithmetic, matmul, reshape, transpose, the
axis/keepdims reductions, and the elementwise activations in jax.nn.
Dimensions are modeled and dtypes are not, so adding dtypes later means modeling
JAX's own defaults (float32 and int32) rather than copying the NumPy stubs.
Shape rules use the type-level DSL, @type_shape_dsl_function, exclusively. A
rule the DSL cannot express yet returns a gradual shape instead. Where a rule is
imprecise for that reason, the stub says so at the definition, along with
whether a fix is expected.
TENSOR_SHAPES_CONTRIBUTING.md at the repository root covers the workflow, and
tensor-shapes/run_tests.py runs the tests. Pyrefly checks the stubs themselves
and every test/test_*.py, and those same test files then run against real
JAX, so a stub that is self-consistent but wrong still fails.
Before submitting a change, format this package with Ruff from the repository root:
uv tool run --from ruff==0.16.5 ruff format tensor-shapes/jax-pyrefly-stubs
Anything not listed above is simply absent rather than modeled loosely, so it is reported as a missing attribute rather than inferred gradually.
Metadata
Release files for jax-pyrefly-stubs 1.4.0.dev3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jax_pyrefly_stubs-1.4.0.dev3.tar.gz | 43.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jax_pyrefly_stubs-1.4.0.dev3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.4 kB
Release files / jax_pyrefly_stubs-1.4.0.dev3.tar.gz
| Download URL | jax_pyrefly_stubs-1.4.0.dev3.tar.gz |
|---|---|
| Size | 43.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f83d511841045ea6429220bf36a609cce31ee5f917e50782269814b9d150a50
|
|
BLAKE2b-256 checksum How to use checksums |
a96a01f61e5d39d528cc6f3ff8e03b8976b49587ebc01f2331676416333a283c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logRelease files / jax_pyrefly_stubs-1.4.0.dev3-py3-none-any.whl
| Download URL | jax_pyrefly_stubs-1.4.0.dev3-py3-none-any.whl |
|---|---|
| Size | 49.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1eff4fdaa58120029b75570b3b740bc5bb3e277463cc0f9df2cdc1fd474d67cc
|
|
BLAKE2b-256 checksum How to use checksums |
445d1d9ce261294211ea1bf8de757350aa8f41ad67ab12c05b93395d9791e4b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency log