Skip to content

Commit a06c3f0

Browse files
STY: Further simplification
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent e6d8876 commit a06c3f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nibabel/volumeutils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
DT = ty.TypeVar('DT', bound=np.generic)
3636

3737
sys_is_le = sys.byteorder == 'little'
38-
native_code = (sys_is_le and '<') or '>'
39-
swapped_code = (sys_is_le and '>') or '<'
38+
native_code, swapped_code = ('<', '>') if sys_is_le else ('>', '<')
4039

4140
_endian_codes = ( # numpy code, aliases
4241
('<', 'little', 'l', 'le', 'L', 'LE'),

0 commit comments

Comments
 (0)