[ENH] Avoid hidden modification of variables within find_sub_ses_pattern_path
/ remove Parallel processing
#1309
Labels
enhancement
New feature or request
As noticed in PR #1285, the function
find_sub_ses_pattern_path
(renamed asfind_images_path
) fromutils/inputs.py
currently returns nothing because it modifies its input :clinica/clinica/utils/inputs.py
Lines 273 to 281 in 954d4a9
The lists
results
anderror_encountered
are incremented within the function. It would be better to have it copy the input and return the modified version of the copy rather than modifying the input sneakily.This function is only used twice, including in a Parallel processing :
clinica/clinica/utils/inputs.py
Lines 778 to 792 in 954d4a9
That Parallel processing may not be efficient for the task it is used for, and could be replaced (to investigate).
The text was updated successfully, but these errors were encountered: