@@ -79,7 +79,10 @@ def unary_assert_against_refimpl(
79
79
scalar_i = in_stype (in_ [idx ])
80
80
if not filter_ (scalar_i ):
81
81
continue
82
- expected = refimpl (scalar_i )
82
+ try :
83
+ expected = refimpl (scalar_i )
84
+ except OverflowError :
85
+ continue
83
86
if res .dtype != xp .bool :
84
87
assert m is not None and M is not None # for mypy
85
88
if expected <= m or expected >= M :
@@ -122,7 +125,10 @@ def binary_assert_against_refimpl(
122
125
scalar_r = in_stype (right [r_idx ])
123
126
if not (filter_ (scalar_l ) and filter_ (scalar_r )):
124
127
continue
125
- expected = refimpl (scalar_l , scalar_r )
128
+ try :
129
+ expected = refimpl (scalar_l , scalar_r )
130
+ except OverflowError :
131
+ continue
126
132
if res .dtype != xp .bool :
127
133
assert m is not None and M is not None # for mypy
128
134
if expected <= m or expected >= M :
@@ -359,7 +365,10 @@ def binary_param_assert_against_refimpl(
359
365
scalar_l = in_stype (left [idx ])
360
366
if not filter_ (scalar_l ):
361
367
continue
362
- expected = refimpl (scalar_l , right )
368
+ try :
369
+ expected = refimpl (scalar_l , right )
370
+ except OverflowError :
371
+ continue
363
372
if left .dtype != xp .bool :
364
373
assert m is not None and M is not None # for mypy
365
374
if expected <= m or expected >= M :
0 commit comments