Skip to content

Commit fffc62c

Browse files
committed
fix: using non-integer for slicing is bad
1 parent 06f36b0 commit fffc62c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/algorithms/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ def split_rois(in_file, mask=None, roishape=None):
12731273
if fill > 0:
12741274
droi = np.vstack((droi, np.zeros((int(fill), int(nvols)), dtype=np.float32)))
12751275
partialmsk = np.ones((roisize,), dtype=np.uint8)
1276-
partialmsk[-fill:] = 0
1276+
partialmsk[-int(fill):] = 0
12771277
partname = op.abspath('partialmask.nii.gz')
12781278
nb.Nifti1Image(partialmsk.reshape(roishape), None,
12791279
None).to_filename(partname)

0 commit comments

Comments
 (0)