Metadata-Version: 2.5
Name: pyrefly-einops-stubs
Version: 1.4.0.dev1
Summary: Einops type stubs with tensor-shape tracking, maintained by Pyrefly
Project-URL: homepage, https://pyrefly.org
Project-URL: documentation, https://pyrefly.org/en/docs/
License: MIT License
        
        Copyright (c) Meta Platforms, Inc. and affiliates.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: einops,stubs,typechecker,typechecking
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Stubs Only
Requires-Python: >=3.12
Requires-Dist: pyrefly-shape-extensions==1.4.0.dev1
Requires-Dist: pyrefly-torch-stubs==1.4.0.dev1
Description-Content-Type: text/markdown

# Pyrefly einops shape stubs

This package is a PEP 561 stub-only distribution for `einops`. It provides
shape-aware annotations for `rearrange`, `reduce`, `repeat`, and `einsum` using
Pyrefly's type-level shape DSL.

The precise annotations currently target PyTorch. The runtime corpus also
exercises NumPy and JAX to validate that the shared einops pattern semantics
agree across backends.

TODO: Once Pyrefly supports a `MapShape` type operator, make the annotations
generic over array libraries while preserving the input's nominal array type.

Patterns that need named `axes_lengths` currently return a gradual shape; the
core evaluator already supports those lengths, and a future call-site bridge
will make them available to the shape rule.

Run the static tests with:

```bash
python3 tensor-shapes/pyrefly-einops-stubs/run_pyrefly.py --buck
```
