Skip to content

Commit ea6c9f0

Browse files
authored
Merge pull request numpy#26938 from jorenham/fix-stubs-type-alias-_dtype
TYP,BUG: Fix ``dtype`` type alias specialization issue in ``__init__.pyi``
2 parents 42b22a2 + b544f3c commit ea6c9f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ _ArrayNumber_co: TypeAlias = NDArray[np.bool | number[Any]]
14201420
_ArrayTD64_co: TypeAlias = NDArray[np.bool | integer[Any] | timedelta64]
14211421

14221422
# Introduce an alias for `dtype` to avoid naming conflicts.
1423-
_dtype: TypeAlias = dtype
1423+
_dtype: TypeAlias = dtype[_ScalarType]
14241424

14251425
if sys.version_info >= (3, 13):
14261426
from types import CapsuleType as _PyCapsule

0 commit comments

Comments
 (0)