Skip to content

Commit 3b93186

Browse files
committed
perf on dtype comparisons
1 parent ead3ca8 commit 3b93186

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/dtypes.py

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ def is_dtype(cls, dtype):
7272
dtype = dtype.dtype
7373
if isinstance(dtype, cls):
7474
return True
75+
elif isinstance(dtype, np.dtype):
76+
return False
7577
try:
7678
return cls.construct_from_string(dtype) is not None
7779
except:

0 commit comments

Comments
 (0)