Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit ca3fe78

Browse files
committed
MAINT: fix typing on ndarray.dtype
1 parent 0b0a9dc commit ca3fe78

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

numpy-stubs/__init__.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class ndarray(Generic[_ArrayDtype], _ArrayOrScalarCommon, Iterable, Sized, Conta
300300
order: Optional[str] = ...,
301301
) -> ndarray: ...
302302
@property
303-
def dtype(self) -> Type[_ArrayDtype]: ...
303+
def dtype(self) -> dtype: ...
304304
@property
305305
def ctypes(self) -> _ctypes: ...
306306
@property

tests/reveal/ndarray_methods.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import numpy as np
22

33
nd = np.array([[1, 2], [3, 4]], dtype=np.int64)
4-
reveal_type(nd.dtype) # E: numpy.int64
4+
reveal_type(nd.dtype) # E: numpy.dtype

0 commit comments

Comments
 (0)