Skip to content

Commit 83cbfbf

Browse files
author
Ben Cipollini
committed
Relative threshhold should not be zero!
1 parent 9ff8914 commit 83cbfbf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nibabel/tests/test_round_trip.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,11 @@ def check_arr(test_id, V_in, in_type, out_type, scaling_type):
145145
Ai = A - inter
146146
ulps = [big_bad_ulp(A), big_bad_ulp(Ai)]
147147
exp_abs_err = np.max(ulps, axis=0)
148+
rel_thresh = ulp(scaling_type(inter))
149+
148150
else: # floats can give full precision - no error!
149151
exp_abs_err = np.zeros_like(abs_err)
150-
rel_thresh = 0
152+
rel_thresh = 0
151153

152154
else:
153155
# Error from integer rounding

0 commit comments

Comments
 (0)