Skip to content

Commit ccc8dc2

Browse files
committed
RF: Simplify data retrieval, avoid needless upcast
1 parent 9c50f2a commit ccc8dc2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nipype/algorithms/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ class FuzzyOverlap(SimpleInterface):
441441

442442
def _run_interface(self, runtime):
443443
# Load data
444-
refdata = np.asanyarray(nb.concat_images(self.inputs.in_ref).dataobj)
445-
tstdata = np.asanyarray(nb.concat_images(self.inputs.in_tst).dataobj)
444+
refdata = nb.concat_images(self.inputs.in_ref).dataobj
445+
tstdata = nb.concat_images(self.inputs.in_tst).dataobj
446446

447447
# Data must have same shape
448448
if not refdata.shape == tstdata.shape:

nipype/algorithms/rapidart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None):
526526
g[t0] = np.nansum(vol * mask_tmp) / np.nansum(mask_tmp)
527527
elif masktype == "file": # uses a mask image to determine intensity
528528
maskimg = load(self.inputs.mask_file)
529-
mask = maskimg.get_fdata()
529+
mask = maskimg.get_fdata(dtype=np.float32)
530530
affine = maskimg.affine
531531
mask = mask > 0.5
532532
for t0 in range(timepoints):

0 commit comments

Comments
 (0)