(no title)
pseudonom- | 2 years ago
You can push some of this directly into Python type annotations thanks to https://peps.python.org/pep-0646/.
e.g.
@overload
def mean(a: ndarray[float, Dim1, *Shape], axis: Literal[0]) -> ndarray[float, *Shape]: ...
@overload
def mean(a: ndarray[float, Dim1, Dim2, *Shape], axis: Literal[1]) -> ndarray[float, Dim1, *Shape]: ...
No comments yet.