Skip to content

Commit e60074b

Browse files
authored
[HOTFIX] find_outlier_trials() bug (#72)
1 parent dc3c29c commit e60074b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

citation.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
given-names: "Nicolas"
66
orcid: "https://orcid.org/0000-0003-1495-561X"
77
title: "MEEGkit"
8-
version: 0.1.5
8+
version: 0.1.6
99
doi: 10.5281/zenodo.10210992
10-
date-released: 2023-11-27
10+
date-released: 2023-11-28
1111
url: "https://github.com/nbara/python-meegkit"

meegkit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""M/EEG denoising utilities in python."""
2-
__version__ = "0.1.5"
2+
__version__ = "0.1.6"
33

44
from . import asr, cca, detrend, dss, lof, ress, sns, star, trca, tspca, utils
55

meegkit/utils/denoise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def find_outlier_trials(X, thresh=None, show=True):
223223
plt.show()
224224

225225
thresh = thresh[1:]
226-
if thresh:
226+
if thresh.any():
227227
bads, _ = find_outlier_trials(X[:, idx], thresh, show)
228228
idx = np.setdiff1d(idx, idx[bads])
229229

tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def test_outliers(show=False):
238238
idx, _ = find_outlier_trials(x, 2, show=show)
239239
np.testing.assert_array_equal(idx, np.arange(5))
240240

241-
idx, _ = find_outlier_trials(x, [2, 2], show=True)
241+
idx, _ = find_outlier_trials(x, [5, 2, 2], show=True)
242242
np.testing.assert_array_equal(idx, np.arange(5))
243243

244244
idx = find_outlier_samples(x, 5)

0 commit comments

Comments
 (0)