Skip to content

Commit f7433c8

Browse files
committed
BUG: Raise TypeError for mismatched signed/unsigned dtypes
1 parent ed887d9 commit f7433c8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pandas/core/arrays/interval.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,12 +537,10 @@ def from_arrays(
537537
right = _maybe_convert_platform_interval(right)
538538

539539
# Check for mismatched signed/unsigned integer dtypes
540-
left_dtype = getattr(left, "dtype", None)
541-
right_dtype = getattr(right, "dtype", None)
540+
left_dtype = left.dtype
541+
right_dtype = right.dtype
542542
if (
543-
left_dtype is not None
544-
and right_dtype is not None
545-
and left_dtype.kind in "iu"
543+
left_dtype.kind in "iu"
546544
and right_dtype.kind in "iu"
547545
and left_dtype.kind != right_dtype.kind
548546
):

0 commit comments

Comments
 (0)