See if it can be removed by properly accounting for the missing type parameters of Shape or by typing the NDArray diferently. This could potentially also lead to a solution of the problem with the invariance of the TypeVarTuple used in the shape: the _ShapeTypeVar could be made covariant - check if that changes anything.
There is now still a
type: ignore
instruction in the definition of the shape part of theNDArray
type, that seems ill-advised:See if it can be removed by properly accounting for the missing type parameters of
Shape
or by typing theNDArray
diferently. This could potentially also lead to a solution of the problem with the invariance of theTypeVarTuple
used in the shape: the_ShapeTypeVar
could be made covariant - check if that changes anything.