Skip to content

Commit

Permalink
Convert outlier_idx to a list.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Oct 11, 2023
1 parent 6bd6a0b commit 2c8f87b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xcp_d/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def denoise_with_nilearn(
)
# Replace any high-motion volumes at the beginning or end of the run with the closest
# low-motion volume's data.
outlier_idx = np.where(~sample_mask)[0]
outlier_idx = list(np.where(~sample_mask)[0])
if outlier_idx:
# Use https://stackoverflow.com/a/48106843/2589328 to group consecutive blocks of outliers.
gaps = [[s, e] for s, e in zip(outlier_idx, outlier_idx[1:]) if s + 1 < e]
Expand Down

0 comments on commit 2c8f87b

Please sign in to comment.