Skip to content

Commit 1c6738d

Browse files
committed
FIX: Minor fixes
1 parent 7989b43 commit 1c6738d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nibabel/nicom/dicomwrappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def get_affine(self):
304304
# column, slice)
305305
vox = self.voxel_sizes
306306
ipp = self.image_position
307-
if orient is None or vox is None or ipp is None:
307+
if any(p is None for p in (orient, vox, ipp)):
308308
raise WrapperError('Not enough information for affine')
309309
aff = np.eye(4)
310310
aff[:3, :3] = orient * np.array(vox)

nibabel/tests/test_analyze.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ def test_log_checks(self):
152152
# datatype not supported
153153
hdr['datatype'] = 255 # severity 40
154154
fhdr, message, raiser = self.log_chk(hdr, 40)
155-
#assert_equal(message, 'data code 255 not supported; '
156-
# 'not attempting fix')
157-
#assert_raises(*raiser)
155+
assert_equal(message, 'data code 255 not supported; '
156+
'not attempting fix')
157+
assert_raises(*raiser)
158158
# bitpix
159159
hdr = HC()
160160
hdr['datatype'] = 16 # float32

0 commit comments

Comments
 (0)