File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def test_apply(
5252 a_np = np .random .uniform (low = low , high = high , size = shape ).astype (A .dtype ) * 10
5353 # avoid round check too close to boundary
5454 if check_round :
55- a_np += ((np .fmod (a_np , 1 ) - 0.5 ) < 1e-6 ) * 1e-5
55+ a_np += ((np .abs ( np . fmod (a_np , 1 ) ) - 0.5 ) < 1e-6 ) * 1e-5
5656 b_np = f_numpy (a_np )
5757
5858 def check_device (device ):
@@ -100,7 +100,7 @@ def test_isnan(
100100 a_np .ravel ()[np .random .choice (a_np .size , int (a_np .size * 0.5 ), replace = False )] = np .nan
101101 # avoid round check too close to boundary
102102 if check_round :
103- a_np += ((np .fmod (a_np , 1 ) - 0.5 ) < 1e-6 ) * 1e-5
103+ a_np += ((np .abs ( np . fmod (a_np , 1 ) ) - 0.5 ) < 1e-6 ) * 1e-5
104104 b_np = np .isnan (a_np )
105105
106106 def check_device (device ):
You can’t perform that action at this time.
0 commit comments