File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -1297,17 +1297,19 @@ def test_remainder(
12971297):
12981298 left = data .draw (left_strat , label = left_sym )
12991299 right = data .draw (right_strat , label = right_sym )
1300- # TODO: rework same sign testing below to remove this
1301- if not right_is_scalar :
1302- assume (len (left .shape ) <= len (right .shape ))
1300+ if right_is_scalar :
1301+ out_dtype = left .dtype
1302+ else :
1303+ out_dtype = dh .result_type (left .dtype , right .dtype )
1304+ if dh .is_int_dtype (out_dtype ):
1305+ if right_is_scalar :
1306+ assume (right != 0 )
1307+ else :
1308+ assume (not ah .any (right == 0 ))
13031309
1304- res = func (left , right )
1310+ func (left , right )
13051311
1306- if not right_is_scalar :
1307- # res and x2 should have the same sign.
1308- # ah.assert_same_sign returns False for nans
1309- not_nan = ah .logical_not (ah .logical_or (ah .isnan (res ), ah .isnan (left )))
1310- ah .assert_same_sign (res [not_nan ], right [not_nan ])
1312+ # TODO: test results
13111313
13121314
13131315@given (xps .arrays (dtype = xps .numeric_dtypes (), shape = hh .shapes ()))
You can’t perform that action at this time.
0 commit comments