Skip to content

Commit c20841b

Browse files
committed
RF: add bottom left 1 to affine for tests
Doesn't make any difference to calculations, but for the sake of a formally correct affine.
1 parent 03372c3 commit c20841b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nibabel/tests/test_orientations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def test_io_orientation():
206206
# Test drop of rows, columns
207207
mat, vec = to_matvec(def_aff)
208208
aff_extra_col = np.zeros((4, 5))
209+
aff_extra_col[-1, -1] = 1 # Not strictly necessary, but for completeness
209210
aff_extra_col[:3, :3] = mat
210211
aff_extra_col[:3, -1] = vec
211212
assert_array_equal(io_orientation(aff_extra_col, tol=1e-5),
@@ -214,6 +215,7 @@ def test_io_orientation():
214215
[2, 1],
215216
[np.nan, np.nan]])
216217
aff_extra_row = np.zeros((5, 4))
218+
aff_extra_row[-1, -1] = 1 # Not strictly necessary, but for completeness
217219
aff_extra_row[:3, :3] = mat
218220
aff_extra_row[:3, -1] = vec
219221
assert_array_equal(io_orientation(aff_extra_row, tol=1e-5),

0 commit comments

Comments
 (0)