Metadata-Version: 2.4
Name: tensi-shapes
Version: 0.3.4
Summary: Named tensor shapes for unannotated PyTorch: hovers, shape errors and a CLI, built on Pyrefly.
Author: Tristan Farran
License-Expression: MIT
Project-URL: Homepage, https://github.com/tristan-farran/tensi
Project-URL: Issues, https://github.com/tristan-farran/tensi/issues
Project-URL: Changelog, https://github.com/tristan-farran/tensi/blob/main/CHANGELOG.md
Keywords: pytorch,tensor,shapes,type-checking,pyrefly,jaxtyping,einops,lsp
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyrefly==1.5.0
Requires-Dist: pyrefly-torch-stubs==1.5.0
Requires-Dist: pyrefly-shape-extensions==1.5.0
Requires-Dist: parso>=0.8.4
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: jaxtyping; extra == "test"
Requires-Dist: einops; extra == "test"
Dynamic: license-file

<p align="center">
  <img src="https://raw.githubusercontent.com/tristan-farran/tensi/main/brand/tensi-logo.svg" alt="tensi" width="440">
</p>

<p align="center">
  <b>tensi sees your tensors, and now you do too!</b><br>
  Hover any PyTorch tensor and see its shape, with <i>named dimensions</i>.
</p>

<p align="center">
  <img src="https://raw.githubusercontent.com/tristan-farran/tensi/main/docs/demo.gif" alt="tensi showing named tensor shapes in nanoGPT">
</p>

## Install


<p align="center">
  <a href="https://marketplace.visualstudio.com/items?itemName=TristanFarran.tensi">VS Code</a> ·
  <a href="https://pypi.org/project/tensi-shapes/">PyPI</a>
</p>

**Command line and CI:** `uv add --dev tensi-shapes` (or `pip install tensi-shapes`).

```bash
tensi peek model.py   # every tensor's shape
tensi check src/      # shape errors; exits 1 if any
```

tensi says when a newer release is out and how to install it (checked at most once a day, never in CI; `TENSI_NO_UPDATE_CHECK=1` turns it off).

<sub>Built on Pyrefly :)</sub>
