Skip to content

Commit

Permalink
Merge branch 'resample_events' of https://github.com/Randomidous/mne-…
Browse files Browse the repository at this point in the history
…python into resample_events
  • Loading branch information
Randomidous committed Jan 17, 2025
2 parents d3c7533 + 0bba079 commit 9c5c737
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions doc/changes/devel/13070.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
return events if provided when current = desired sfreq
in :func:`mne.io.base.resample` by :newcontrib:`Roy Eric Wieske`.
Return events when requested even when current matches the desired sfreq in :meth:`mne.io.Raw.resample` by :newcontrib:`Roy Eric Wieske`.
4 changes: 2 additions & 2 deletions mne/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,8 +1386,8 @@ def resample(
sfreq = float(sfreq)
o_sfreq = float(self.info["sfreq"])
if _check_resamp_noop(sfreq, o_sfreq):
if events:
return self, events
if events is not None:
return self, events.copy()
else:
return self

Expand Down

0 comments on commit 9c5c737

Please sign in to comment.