@@ -267,25 +267,25 @@ def test_ornt2axcodes():
267267 # Recoding orientation to axis codes
268268 labels = (('left' , 'right' ), ('back' , 'front' ), ('down' , 'up' ))
269269 assert ornt2axcodes ([[0 , 1 ],
270- [1 , 1 ],
271- [2 , 1 ]], labels ) == ('right' , 'front' , 'up' )
270+ [1 , 1 ],
271+ [2 , 1 ]], labels ) == ('right' , 'front' , 'up' )
272272 assert ornt2axcodes ([[0 , - 1 ],
273- [1 , - 1 ],
274- [2 , - 1 ]], labels ) == ('left' , 'back' , 'down' )
273+ [1 , - 1 ],
274+ [2 , - 1 ]], labels ) == ('left' , 'back' , 'down' )
275275 assert ornt2axcodes ([[2 , - 1 ],
276- [1 , - 1 ],
277- [0 , - 1 ]], labels ) == ('down' , 'back' , 'left' )
276+ [1 , - 1 ],
277+ [0 , - 1 ]], labels ) == ('down' , 'back' , 'left' )
278278 assert ornt2axcodes ([[1 , 1 ],
279- [2 , - 1 ],
280- [0 , 1 ]], labels ) == ('front' , 'down' , 'right' )
279+ [2 , - 1 ],
280+ [0 , 1 ]], labels ) == ('front' , 'down' , 'right' )
281281 # default is RAS output directions
282282 assert ornt2axcodes ([[0 , 1 ],
283- [1 , 1 ],
284- [2 , 1 ]]) == ('R' , 'A' , 'S' )
283+ [1 , 1 ],
284+ [2 , 1 ]]) == ('R' , 'A' , 'S' )
285285 # dropped axes produce None
286286 assert ornt2axcodes ([[0 , 1 ],
287- [np .nan , np .nan ],
288- [2 , 1 ]]) == ('R' , None , 'S' )
287+ [np .nan , np .nan ],
288+ [2 , 1 ]]) == ('R' , None , 'S' )
289289 # Non integer axes raises error
290290 with pytest .raises (ValueError ):
291291 ornt2axcodes ([[0.1 , 1 ]])
@@ -365,10 +365,8 @@ def test_axcodes2ornt():
365365def test_aff2axcodes ():
366366 assert aff2axcodes (np .eye (4 )) == tuple ('RAS' )
367367 aff = [[0 , 1 , 0 , 10 ], [- 1 , 0 , 0 , 20 ], [0 , 0 , 1 , 30 ], [0 , 0 , 0 , 1 ]]
368- assert (aff2axcodes (aff , (('L' , 'R' ), ('B' , 'F' ), ('D' , 'U' ))) ==
369- ('B' , 'R' , 'U' ))
370- assert (aff2axcodes (aff , (('L' , 'R' ), ('B' , 'F' ), ('D' , 'U' ))) ==
371- ('B' , 'R' , 'U' ))
368+ assert aff2axcodes (aff , (('L' , 'R' ), ('B' , 'F' ), ('D' , 'U' ))) == ('B' , 'R' , 'U' )
369+ assert aff2axcodes (aff , (('L' , 'R' ), ('B' , 'F' ), ('D' , 'U' ))) == ('B' , 'R' , 'U' )
372370
373371
374372def test_inv_ornt_aff ():
0 commit comments