Skip to content

Commit c87aaf4

Browse files
committed
BF: adapt arraywriter tests to new offset scaling
Tests tested previous behavior of offset scaling. New offset scaling also gives valid scaling, so adapt tests to results from new scaling.
1 parent 273e335 commit c87aaf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nibabel/tests/test_arraywriters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def test_high_int2uint():
201201
arr = np.array([2**63], dtype=np.uint64)
202202
out_type = np.int64
203203
aw = SlopeInterArrayWriter(arr, out_type)
204-
assert_equal(aw.inter, 2**64)
204+
assert_equal(aw.inter, 2**63)
205205

206206

207207
def test_slope_inter_castable():
@@ -349,7 +349,7 @@ def test_with_offset_scale():
349349
aw = SIAW(np.array([-256, -2], dtype=np.int16), np.uint8)
350350
assert_equal((aw.slope, aw.inter), (1, -256)) # offset only
351351
aw = SIAW(np.array([-256, -2], dtype=np.int16), np.int8)
352-
assert_equal((aw.slope, aw.inter), (1, -128)) # offset only
352+
assert_equal((aw.slope, aw.inter), (1, -129)) # offset only
353353

354354

355355
def test_io_scaling():

0 commit comments

Comments
 (0)