Skip to content

Commit 93c7bb6

Browse files
committed
prepared for future PR to allow modification of dtype used in diff comparison
1 parent 034c276 commit 93c7bb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nibabel/cmdline/diff.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def get_data_hash_diff(files):
130130
"""
131131

132132
md5sums = [
133-
hashlib.md5(np.ascontiguousarray(nib.load(f).get_fdata(dtype=np.float32))).hexdigest()
133+
hashlib.md5(np.ascontiguousarray(nib.load(f).get_fdata())).hexdigest()
134134
for f in files
135135
]
136136

@@ -167,7 +167,8 @@ def get_data_diff(files, max_abs=0, max_rel=0):
167167
"""
168168

169169
# we are doomed to keep them in RAM now
170-
data = [f if isinstance(f, np.ndarray) else nib.load(f).get_fdata(dtype=np.float32) for f in files]
170+
data = [f if isinstance(f, np.ndarray) else nib.load(f).get_fdata()
171+
for f in files]
171172
diffs = OrderedDict()
172173
for i, d1 in enumerate(data[:-1]):
173174
# populate empty entries for non-compared

0 commit comments

Comments
 (0)