Skip to content

Commit 0f10b79

Browse files
author
Jean-Mathieu Deschenes
committed
Fixed unit tests.
1 parent ebcc55c commit 0f10b79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/core/dtypes/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,10 @@ def is_timedelta64_dtype(arr_or_dtype):
396396

397397
if arr_or_dtype is None:
398398
return False
399-
tipo = _get_dtype_type(arr_or_dtype)
399+
try:
400+
tipo = _get_dtype_type(arr_or_dtype)
401+
except ValueError:
402+
return False
400403
return issubclass(tipo, np.timedelta64)
401404

402405

0 commit comments

Comments
 (0)