Skip to content

Commit 4c63e82

Browse files
committed
Optimization: remove not needed copy()s
1 parent c8b70f1 commit 4c63e82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mpd/data/epochs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ def get_epochs(
7171

7272
if l_freq is not None or h_freq is not None:
7373
logging.warning("Frequency filter: %s - %s Hz", l_freq, h_freq)
74-
raw = raw.copy().filter(l_freq=l_freq, h_freq=h_freq)
74+
raw = raw.filter(l_freq=l_freq, h_freq=h_freq)
7575
elif decim > 1:
7676
s_freq = raw.info["sfreq"]
7777
h_freq = s_freq / decim / 2
7878
logging.warning(
7979
"Frequency filter for antialiasing: %s from %s Hz", h_freq, s_freq
8080
)
81-
raw = raw.copy().filter(l_freq=None, h_freq=h_freq)
81+
raw = raw.filter(l_freq=None, h_freq=h_freq)
8282

83-
raw_phones = raw.copy().set_annotations(annotations[label])
83+
raw_phones = raw.set_annotations(annotations[label])
8484
phone_events, phone_event_id = mne.events_from_annotations(raw_phones)
8585

8686
if selected_phones is not None:

0 commit comments

Comments
 (0)