@@ -103,7 +103,7 @@ def test_write_mgh():
103
103
assert h ['type' ] == 3
104
104
assert h ['dof' ] == 0
105
105
assert h ['goodRASFlag' ] == 1
106
- assert_array_equal (h ['dims' ], [5 , 4 , 3 , 2 ])
106
+ assert np . array_equal (h ['dims' ], [5 , 4 , 3 , 2 ])
107
107
assert_almost_equal (h ['tr' ], 0.0 )
108
108
assert_almost_equal (h ['flip_angle' ], 0.0 )
109
109
assert_almost_equal (h ['te' ], 0.0 )
@@ -133,7 +133,7 @@ def test_write_noaffine_mgh():
133
133
assert h ['type' ] == 0 # uint8 for mgh
134
134
assert h ['dof' ] == 0
135
135
assert h ['goodRASFlag' ] == 1
136
- assert_array_equal (h ['dims' ], [7 , 13 , 3 , 22 ])
136
+ assert np . array_equal (h ['dims' ], [7 , 13 , 3 , 22 ])
137
137
assert_almost_equal (h ['tr' ], 0.0 )
138
138
assert_almost_equal (h ['flip_angle' ], 0.0 )
139
139
assert_almost_equal (h ['te' ], 0.0 )
@@ -217,7 +217,7 @@ def test_header_updating():
217
217
assert_almost_equal (mgz .affine , exp_aff , 6 )
218
218
assert_almost_equal (hdr .get_affine (), exp_aff , 6 )
219
219
# Test that initial wonky header elements have not changed
220
- assert_array_equal (hdr ['delta' ], 1 )
220
+ assert np . array_equal (hdr ['delta' ], 1 )
221
221
assert_almost_equal (hdr ['Mdc' ].T , exp_aff [:3 , :3 ])
222
222
# Save, reload, same thing
223
223
img_fobj = io .BytesIO ()
@@ -458,7 +458,7 @@ def test_bytes(self):
458
458
# Long binaryblocks are truncated
459
459
with pytest .raises (WrapStructError ):
460
460
self .header_class (bb [:self .header_class ._hdrdtype .itemsize - 1 ])
461
-
461
+
462
462
# Checking set to true by default, and prevents nonsense being
463
463
# set into the header.
464
464
bb_bad = self .get_bad_bb ()
@@ -467,7 +467,7 @@ def test_bytes(self):
467
467
with imageglobals .LoggingOutputSuppressor ():
468
468
with pytest .raises (HeaderDataError ):
469
469
self .header_class (bb_bad )
470
-
470
+
471
471
# now slips past without check
472
472
_ = self .header_class (bb_bad , check = False )
473
473
@@ -493,7 +493,7 @@ def check_fix(self, *args, **kwargs):
493
493
# Assumes check=True default
494
494
with pytest .raises (Exception ):
495
495
DC (hdr .binaryblock )
496
-
496
+
497
497
hdr = DC (hdr .binaryblock , check = False )
498
498
hdr2 = hdr .as_byteswapped ('>' )
499
499
0 commit comments