Skip to content

Conversation

@larsoner
Copy link
Member

Iteration was done over content[::-1] but the idx used came from enumerateing this, which meant it was in the wrong order. What needed to be used was len(content) - idx - 1. This code just simplifies things by iterating over all elements (which should be fast enough even for hundreds of them) and taking the last matching index directly.

@larsoner larsoner added the backport-candidate on-merge: backport to maint/1.11 label Nov 10, 2022
@agramfort agramfort merged commit 4f3ad29 into mne-tools:main Nov 11, 2022
@larsoner larsoner deleted the report branch November 11, 2022 16:57
@larsoner larsoner added backported and removed backport-candidate on-merge: backport to maint/1.11 labels Nov 11, 2022
larsoner added a commit to ruuskas/mne-python that referenced this pull request Nov 17, 2022
* upstream/main:
  fix epochs.plot_image for EMG data (mne-tools#11322)
  fix fontawesome icon display (mne-tools#11328)
  [DOC, MRG] fix/improve documentation of n_jobs for apply_function (mne-tools#11325)
  [MAINT, MRG] fix is_mesa (mne-tools#11313)
  BUG: Fix bug with parallel progress bars (mne-tools#11311)
  BUG: Fix bug with report replacement (mne-tools#11318)
  MAINT: Fix docs (mne-tools#11317)
  Fix typo in changelog (mne-tools#11315)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants