We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23cb5c7 commit 1e14998Copy full SHA for 1e14998
nibabel/tests/test_nifti1.py
@@ -538,8 +538,7 @@ def test_slice_times(self):
538
hdr.set_slice_duration(0.1)
539
# We need a function to print out the Nones and floating point
540
# values in a predictable way, for the tests below.
541
- _stringer = lambda val: (val is not None and f'{val:2.1f}') or None
542
- _print_me = lambda s: list(map(_stringer, s))
+ _print_me = lambda s: [val if val is None else f'{val:2.1f}' for val in s]
543
# The following examples are from the nifti1.h documentation.
544
hdr['slice_code'] = slice_order_codes['sequential increasing']
545
assert _print_me(hdr.get_slice_times()) == [
0 commit comments