From 33e3f465971128553e1d50abcd660778720d7fa3 Mon Sep 17 00:00:00 2001 From: Teon L Brooks Date: Mon, 14 Mar 2016 18:16:59 -0400 Subject: [PATCH] FIX merge_events when replace_events=False --- mne/event.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mne/event.py b/mne/event.py index 531fe04253e..7b0374a1bab 100644 --- a/mne/event.py +++ b/mne/event.py @@ -670,6 +670,7 @@ def merge_events(events, ids, new_id, replace_events=True): where = (events[:, col] == i) events_out[where, col] = new_id if not replace_events: + events_out = events_out[where] events_out = np.concatenate((events_out, events), axis=0) events_out = events_out[np.argsort(events_out[:, 0])] return events_out