File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -263,19 +263,6 @@ def __new__(
263263 dtype = dtype ,
264264 )
265265
266- # Check for mismatched signed/unsigned integer dtypes after casting
267- left_dtype = left .dtype
268- right_dtype = right .dtype
269- if (
270- left_dtype .kind in "iu"
271- and right_dtype .kind in "iu"
272- and left_dtype .kind != right_dtype .kind
273- ):
274- raise TypeError (
275- f"Left and right arrays must have matching signedness. "
276- f"Got { left_dtype } and { right_dtype } ."
277- )
278-
279266 if verify_integrity :
280267 cls ._validate (left , right , dtype = dtype )
281268
@@ -394,6 +381,18 @@ def _ensure_simple_new_inputs(
394381
395382 dtype = IntervalDtype (left .dtype , closed = closed )
396383
384+ # Check for mismatched signed/unsigned integer dtypes after casting
385+ left_dtype = left .dtype
386+ right_dtype = right .dtype
387+ if (
388+ left_dtype .kind in "iu"
389+ and right_dtype .kind in "iu"
390+ and left_dtype .kind != right_dtype .kind
391+ ):
392+ raise TypeError (
393+ f"Left and right arrays must have matching signedness. "
394+ f"Got { left_dtype } and { right_dtype } ."
395+ )
397396 return left , right , dtype
398397
399398 @classmethod
You can’t perform that action at this time.
0 commit comments