We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3e198f commit 7edf076Copy full SHA for 7edf076
pandas/core/dtypes/cast.py
@@ -1410,7 +1410,7 @@ def np_find_common_type(*dtypes: np.dtype) -> np.dtype:
1410
"""
1411
try:
1412
common_dtype = np.result_type(*dtypes)
1413
- if common_dtype.kind in "mMSU":
+ if common_dtype.kind in "mMSU" or common_dtype not in dtypes:
1414
# NumPy promotion currently (1.25) misbehaves for for times and strings,
1415
# so fall back to object (find_common_dtype did unless there
1416
# was only one dtype)
0 commit comments