summaryrefslogtreecommitdiff
path: root/numpy/__init__.pyi
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2021-01-29 12:07:01 +0000
committerGitHub <noreply@github.com>2021-01-29 12:07:01 +0000
commit9772bea95f3d079c2b59107ddd9731602b5edde0 (patch)
tree4738e7abad35b274431445bad3cf9a9a9181737c /numpy/__init__.pyi
parentb969f8c9a2178bec235d6c47db3e7cd68c5d39c1 (diff)
parentd788788f8233d96e647c64bd4070305146b9ff92 (diff)
downloadnumpy-9772bea95f3d079c2b59107ddd9731602b5edde0.tar.gz
Merge pull request #18236 from BvB93/dtype-like
ENH: Add aliases for commonly used dtype-like objects
Diffstat (limited to 'numpy/__init__.pyi')
-rw-r--r--numpy/__init__.pyi5
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi
index 911b496df..fe9dc5914 100644
--- a/numpy/__init__.pyi
+++ b/numpy/__init__.pyi
@@ -682,14 +682,13 @@ class dtype(Generic[_DTypeScalar_co]):
align: bool = ...,
copy: bool = ...,
) -> dtype[_DTypeScalar_co]: ...
- # TODO: handle _SupportsDType better
@overload
def __new__(
cls,
- dtype: _SupportsDType,
+ dtype: _SupportsDType[dtype[_DTypeScalar_co]],
align: bool = ...,
copy: bool = ...,
- ) -> dtype[Any]: ...
+ ) -> dtype[_DTypeScalar_co]: ...
# Handle strings that can't be expressed as literals; i.e. s1, s2, ...
@overload
def __new__(