Skip to content

Commit

Permalink
Merge pull request #237 from oesteban/fix/first_func
Browse files Browse the repository at this point in the history
[FIX,RTM] Utility function _first crashes with strings
  • Loading branch information
chrisgorgo committed Dec 7, 2016
2 parents b08fd6a + 9fb2fe5 commit 7fb08cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fmriprep/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
INPUTS_SPEC = {'fieldmaps': [], 'func': [], 't1': [], 'sbref': []}

def _first(inlist):
if not isinstance(inlist, (list, tuple)):
inlist = [inlist]

return sorted(inlist)[0]

def make_folder(folder):
Expand Down

0 comments on commit 7fb08cf

Please sign in to comment.