In Numpy the direct setting of the dtype, shape and strides attributes is being deprecated as these operations are not safe (in particular in the free-threading build). See numpy/numpy#28800 for ...
Types are covariant and they must be tuple[int, ...]. This allows things like NamedTuple, tuple[Literal[1]], tuple[NewType("Frame", int)]. Your example it would be: import numpy as np from typing ...