Microtorch is the shared tensor model for Pyrefly‘s tensor-shape corpus and browser sandbox examples. It is intentionally small and independent of any real tensor library, so Pyrefly’s core shape behavior can be tested here.
Run its static suites with:
python3 tensor-shapes/microtorch/run_pyrefly.py