diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2020-12-09 17:20:45 +0100 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2020-12-09 17:20:45 +0100 |
commit | fbdda8f24924ff63b5abf2782e85206dc34405a7 (patch) | |
tree | b5f5ce3b73aaee553e16078be06fb9a372953a08 | |
parent | 90bcdead2c29f535f4140782610dde10ddd38592 (diff) | |
download | numpy-fbdda8f24924ff63b5abf2782e85206dc34405a7.tar.gz |
ENH: Replace `dtype` with the `_DType` typevar
-rw-r--r-- | numpy/__init__.pyi | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 9f3ba3400..ff275fff2 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -869,7 +869,7 @@ class dtype(Generic[_DTypeScalar]): @property def alignment(self) -> int: ... @property - def base(self) -> dtype: ... + def base(self: _DType) -> _DType: ... @property def byteorder(self) -> str: ... @property @@ -905,14 +905,14 @@ class dtype(Generic[_DTypeScalar]): @property def ndim(self) -> int: ... @property - def subdtype(self) -> Optional[Tuple[dtype, _Shape]]: ... - def newbyteorder(self, __new_order: _ByteOrder = ...) -> dtype: ... + def subdtype(self: _DType) -> Optional[Tuple[_DType, _Shape]]: ... + def newbyteorder(self: _DType, __new_order: _ByteOrder = ...) -> _DType: ... # Leave str and type for end to avoid having to use `builtins.str` # everywhere. See https://github.com/python/mypy/issues/3775 @property def str(self) -> builtins.str: ... @property - def type(self) -> Type[generic]: ... + def type(self) -> Type[_DTypeScalar]: ... class _flagsobj: aligned: bool |