Ignoring a dim specification pep 646

Let’s say there’s an array type such as listed in the pep

from typing import TypeVar, TypeVarTuple

DType = TypeVar('DType')
Shape = TypeVarTuple('Shape')

class Array(Generic[DType, *Shape]):

    def __abs__(self) -> Array[DType, *Shape]: ...

    def __add__(self, other: Array[DType, *Shape]

Now I want to annotate a function Foo that takes in an array with a specific size in 2nd dim but first dim size doesn’t matter. I use an ellipse to indicate Don’tCare in the example. Is this correct? I don’t think so. It’s unclear to me from the pep what the correct way to annotate this, or if it’s possible at all.


from typing import Literal as L


def foo(x: Array[float, ..., L[640]]) -> = Array[float, ..., L[640]]:

What I’m trying to annotate here is that x should be an array floats with shape of Nx640. I don’t care what N is but I care that there is 640 entries along dimension 2