Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Pyrefly einops shape stubs

This package installs einops-shape-stubs, a Pyrefly-specific stub package for runtime einops. Pyrefly discovers it by default; set use-shape-comments-and-stubs = false to opt out. Other type checkers ignore these stubs and continue using einops's ordinary types.

It provides shape-aware annotations for rearrange, reduce, repeat, and einsum using Pyrefly's type-level shape DSL. The einops.layers.torch Rearrange and Reduce modules preserve the constructor pattern and axis lengths across calls.

The precise annotations target PyTorch, NumPy, and JAX. Shape computations are shared; backend overloads describe their different result types. NumPy rearrange and repeat preserve ndarray and its dtype. NumPy reductions and einsum may return array scalars, so their result protocol preserves shape and array conversion without promising ndarray or a dtype that reductions may promote. The precise NumPy reduction and einsum overloads cover numeric and boolean dtypes; object-dtype operations can return arbitrary Python objects and use the gradual fallback.

Backend shape stubs are optional dependencies: install the torch, numpy, or jax extra, or combine them as [torch,numpy,jax]. The base package does not install an array library. Install matching shape stubs for each of these backends present in your environment. Existing Torch users upgrading from the base package must add [torch] to retain Torch shape stubs.

Shape precision with optional backends requires Pyrefly's missing-import overload preference. It favors resolved input contracts without adding call warnings, while preserving return-only recovery and ordinary ambiguity for gradual arguments. Do not configure replace-imports-with-any or ignore-missing-imports for absent backends: those settings erase the provenance of unavailable annotations.

Literal axes_lengths keyword arguments are carried into the shape rules, so named input splits and repeated output axes remain tracked. Dynamically unpacked mappings preserve the known rank but use gradual dimensions for unknown axis lengths.

Run the static tests with:

python3 tensor-shapes/pyrefly-einops-stubs/run_pyrefly.py --buck
python3 tensor-shapes/pyrefly-einops-stubs/run_optional_backends.py --pyrefly /path/to/pyrefly

Metadata

Release files for pyrefly-einops-stubs 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for pyrefly-einops-stubs 1.5.0
File Size Uploaded Provenance Actions
pyrefly_einops_stubs-1.5.0.tar.gz 4.3 kB With provenance Details for pyrefly_einops_stubs-1.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrefly-einops-stubs 1.5.0
File Interpreter ABI Platform Actions
pyrefly_einops_stubs-1.5.0-py3-none-any.whl Python 3 none any Details for pyrefly_einops_stubs-1.5.0-py3-none-any.whl

Total release size: 11.0 kB

Release files / pyrefly_einops_stubs-1.5.0.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pyrefly_einops_stubs-1.5.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d8eca373ec891c795d8b19d011ce9436a6c4538bd1dbd2062e692d177b814100
BLAKE2b-256 checksum
How to use checksums
b5030d1b332b416f810ffb74d00d8b4b5385f9599d3d237abacaa9bea8e93b72
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 Nov 19, 2026.

Transparency log

Release files / pyrefly_einops_stubs-1.5.0-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pyrefly_einops_stubs-1.5.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6553c9f44e084e2b76c993db367068323797cd517cd664d250c8a3b774a3845c
BLAKE2b-256 checksum
How to use checksums
2f81ef7febfed8701ed9f363462f7109b429b027fd09ae907c49d235dddbebe5
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 Nov 19, 2026.

Transparency log

Security for pyrefly-einops-stubs 1.5.0

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.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Repository

Select from 2 files

Attestation for pyrefly_einops_stubs-1.5.0.tar.gz

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 Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page