diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 2c8855d..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/src/.DS_Store b/src/.DS_Store deleted file mode 100644 index b21c9d1..0000000 Binary files a/src/.DS_Store and /dev/null differ diff --git a/src/ibldsp/voltage.py b/src/ibldsp/voltage.py index c5c03a4..82b04d6 100644 --- a/src/ibldsp/voltage.py +++ b/src/ibldsp/voltage.py @@ -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