Alle Dateien aus dem Pythonkurs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

10 lines
349 B

from typing import Any
import numpy.typing as npt
AR_Any: npt.NDArray[Any]
# Mypy bug where overload ambiguity is ignored for `Any`-parametrized types;
# xref numpy/numpy#20099 and python/mypy#11347
#
# The expected output would be something akin to `ndarray[Any, dtype[Any]]`
reveal_type(AR_Any + 2) # E: ndarray[Any, dtype[signedinteger[Any]]]