Skip to content

Commit 9ff8914

Browse files
author
Ben Cipollini
committed
set BIG_FLOAT to BEST_FLOAT
1 parent c12e031 commit 9ff8914

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

nibabel/tests/test_round_trip.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ def check_params(in_arr, in_type, out_type):
4545
return arr, arr_dash, slope, inter
4646

4747

48-
BFT = best_float()
49-
LOGe2 = np.log(BFT(2))
48+
BEST_FLOAT = best_float()
49+
LOGe2 = np.log(BEST_FLOAT(2))
50+
BIG_FLOAT = BEST_FLOAT
5051

5152

5253
def big_bad_ulp(arr):
@@ -70,7 +71,7 @@ def big_bad_ulp(arr):
7071
# Assumes array is floating point
7172
arr = np.asarray(arr)
7273
info = type_info(arr.dtype)
73-
working_arr = np.abs(arr.astype(BFT))
74+
working_arr = np.abs(arr.astype(BEST_FLOAT))
7475
# Log2 for numpy < 1.3
7576
fl2 = np.zeros_like(working_arr) + info['minexp']
7677
# Avoid divide by zero error for log of 0
@@ -92,9 +93,6 @@ def test_big_bad_ulp():
9293
assert_array_equal(big_bad_ulp(in_arr).astype(ftype), out_arr)
9394

9495

95-
BIG_FLOAT = np.float64
96-
97-
9896
def test_round_trip():
9997
scaling_type = np.float32
10098
rng = np.random.RandomState(20111121)

0 commit comments

Comments
 (0)