BTW I recently discovered you can specify shape too, although most of numpy returns `shape=Any` so it's of limited use at the mo:
ScalarType_co = TypeVar("ScalarType_co", bound=np.generic, covariant=True)
OneDArray = np.ndarray[tuple[int], np.dtype[ScalarType_co]]
TwoDArray = np.ndarray[tuple[int, int], np.dtype[ScalarType_co]]
NPMask = OneDArray[np.bool]
Originally posted by @coretl in #143 (comment)
We can specify dimensional constraints in numpy.typing, so npt.NDArray[tuple[int, int], np.floating[Any]] for example.
There are probably specific places in scanspec where this would be useful, this issue is go through and find them.