Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions nipype/algorithms/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,10 +1059,16 @@ def compute_dvars(

# Robust standard deviation (we are using "lower" interpolation
# because this is what FSL is doing
func_sd = (
np.percentile(mfunc, 75, axis=1, method="lower")
- np.percentile(mfunc, 25, axis=1, method="lower")
) / 1.349
try:
func_sd = (
np.percentile(mfunc, 75, axis=1, method="lower")
- np.percentile(mfunc, 25, axis=1, method="lower")
) / 1.349
except TypeError: # NP < 1.22
func_sd = (
np.percentile(mfunc, 75, axis=1, interpolation="lower")
- np.percentile(mfunc, 25, axis=1, interpolation="lower")
) / 1.349

if remove_zerovariance:
zero_variance_voxels = func_sd > variance_tol
Expand Down