I just wanted to thank Matthew & Pradeep for writing this PEP and for clarifications to the broader context of PEP 646 for array typing in
https://github.com/python/peps/pull/1904.
As someone who is heavily involved in the Python numerical computing community (e.g., NumPy, JAX, Xarray), but who is not so familiar with the details of Python's type system, it is reassuring to see that a broad range of use-cases related to type checking of named axes & shapes have been considered, and could build upon the infrastructure in this PEP.
Type checking for shapes is something the NumPy community is very interested in -- there are more thumbs up on the relevant issue on NumPy's GitHub than any others (
https://github.com/numpy/numpy/issues/7370) and we recently added a "typing" module that is under active development.
It will certainly require experimentation to figure out the best ways to use type checking for ndarrays, but this PEP looks like an excellent foundation for such work.