We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents eb779e6 + 188ebbd commit 4d51686Copy full SHA for 4d51686
nipype/algorithms/confounds.py
@@ -1059,10 +1059,16 @@ def compute_dvars(
1059
1060
# Robust standard deviation (we are using "lower" interpolation
1061
# because this is what FSL is doing
1062
- func_sd = (
1063
- np.percentile(mfunc, 75, axis=1, method="lower")
1064
- - np.percentile(mfunc, 25, axis=1, method="lower")
1065
- ) / 1.349
+ try:
+ func_sd = (
+ np.percentile(mfunc, 75, axis=1, method="lower")
+ - np.percentile(mfunc, 25, axis=1, method="lower")
1066
+ ) / 1.349
1067
+ except TypeError: # NP < 1.22
1068
1069
+ np.percentile(mfunc, 75, axis=1, interpolation="lower")
1070
+ - np.percentile(mfunc, 25, axis=1, interpolation="lower")
1071
1072
1073
if remove_zerovariance:
1074
zero_variance_voxels = func_sd > variance_tol
0 commit comments