Fix NumPy version requirement
@@ -18,8 +18,10 @@ else:
if sys.version_info >= (3, 9):
from types import GenericAlias
+elif numpy.lib.NumpyVersion(numpy.__version__) >= '1.23.0':
+ from numpy._typing import _GenericAlias as GenericAlias
elif numpy.lib.NumpyVersion(numpy.__version__) >= '1.21.0':
- from numpy.typing import _GenericAlias as GenericAlias
+ from numpy.typing import _GenericAlias as GenericAlias # type: ignore
else:
def GenericAlias(*args): # type: ignore
return Any
