diff options
| -rw-r--r-- | numpy/__init__.pyi | 7 | ||||
| -rw-r--r-- | numpy/tests/typing/pass/dtype.py | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 2e9c28821..4aab0bbfa 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -51,7 +51,12 @@ _NdArraySubClass = TypeVar("_NdArraySubClass", bound=ndarray) class dtype: names: Optional[Tuple[str, ...]] - def __init__(self, obj: DtypeLike, align: bool = ..., copy: bool = ...) -> None: ... + def __init__( + self, + dtype: DtypeLike, + align: bool = ..., + copy: bool = ..., + ) -> None: ... def __eq__(self, other: DtypeLike) -> bool: ... def __ne__(self, other: DtypeLike) -> bool: ... def __gt__(self, other: DtypeLike) -> bool: ... diff --git a/numpy/tests/typing/pass/dtype.py b/numpy/tests/typing/pass/dtype.py new file mode 100644 index 000000000..f954fdd44 --- /dev/null +++ b/numpy/tests/typing/pass/dtype.py @@ -0,0 +1,3 @@ +import numpy as np + +np.dtype(dtype=np.int64) |
