Skip to content

v0.1.0

tagged this 12 Sep 17:58
CI failed on one job of fifteen: core / py3.10 / ubuntu-latest, with six mypy
errors of the same shape - a variable whose first binding is 1-D by inference,
reassigned something of unconstrained rank.

No local environment could produce it. NumPy 2.3 gave ndarray's shape parameter
a default, after which mypy never compares tuple[int, ...] against tuple[int];
2.2 is the newest NumPy supporting 3.10 and has the parameter without the
default. This machine's 3.14 has numpy 2.5 and its only other 3.10 is SpinQit's,
pinned to 1.26 whose stubs are not generic over shape at all. So the check passed
twice for reasons unrelated to the code. All six files are ones the widened mypy
scope pulled in.

Reproduced on a purpose-built 3.10.20 + numpy 2.2.6 environment before touching
anything, then fixed by annotating the variables npt.NDArray[Any] at their first
binding - the shape-agnostic spelling the rest of the codebase uses, and an
accurate statement that their rank was never part of the contract.

mypy is now clean on four combinations: 3.10/numpy 2.2, 3.10/numpy 1.26,
3.14/numpy 2.5, and a no-torch install. Tests pass on all three runnable ones:
636 on py3.10 core, 1319 on 3.14 with every extra, 888 on SpinQit.

Worth recording that the tag was deliberately held back until CI had run on the
pushed branch. Had it gone out with the split, the release would have died in
verify and taken 0.1.0 with it, since a PyPI version cannot be reused.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Assets 2
Loading