Skip to content

Commit

Permalink
AMD
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbrodbeck committed May 20, 2021
1 parent 5ddf9fd commit 3d269b4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions eelbrain/_stats/testnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,17 @@ def _max_statistic_from_map(
max_stat = stat_map.min(mask)

if return_time:
dims = [dim for dim in stat_map.dimnames if dim != 'time']
if mask is not None:
stat_map = stat_map.mask(mask)
if dims := [dim for dim in stat_map.dimnames if dim != 'time']:
if max_stat > 0:
stat_map = stat_map.max(dims)
else:
stat_map = stat_map.min(dims)
if max_stat > 0:
time = stat_map.mask(mask).max(dims).argmax('time')
time = stat_map.argmax('time')
else:
time = stat_map.mask(mask).min(dims).argmin('time')
time = stat_map.argmin('time')
return max_stat, time
else:
return max_stat
Expand Down

0 comments on commit 3d269b4

Please sign in to comment.