Skip to content

Commit

Permalink
add compatible syntax for 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
oliche committed Oct 5, 2024
1 parent 3b3c88c commit 7372103
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Binary file removed .DS_Store
Binary file not shown.
Binary file removed src/.DS_Store
Binary file not shown.
9 changes: 4 additions & 5 deletions src/ibldsp/voltage.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,10 @@ def car(x, collection=None, operator='median', **kwargs):
xout[sel, :] = car(x=x[sel, :], collection=None, **kwargs)
return xout

match operator:
case 'median':
x = x - np.median(x, axis=0)
case 'average':
x = x - np.mean(x, axis=0)
if operator == 'median':
x = x - np.median(x, axis=0)
elif operator == 'average':
x = x - np.mean(x, axis=0)
return x


Expand Down

0 comments on commit 7372103

Please sign in to comment.