Third loop in wfdb.processing.peaks.find_local_peaks will not be executed and can be removed
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 52/100
Research direction
Start in wfdb.processing.peaks.find_local_peaks and inspect the loop order and exit condition shown in the issue. Confirm that the final loop is unreachable after the preceding loop, remove only that dead loop, and verify that the function’s existing behavior remains unchanged.
Written by the indexing model from the issue text.
Description
In find_local_peaks() in wfdb.processing.peaks, the last of three loops will not be execute because the condition i < len(sig) is already false when the second loop exits:
[first loop omitted]
while i < len(sig):
if sig[i] == max(sig[i - radius : i + radius]):
peak_inds.append(i)
i += radius
else:
i += 1
while i < len(sig):
if sig[i] == max(sig[i - radius :]):
peak_inds.append(i)
i += radius
else:
i += 1
- Dominant language
- Jupyter Notebook
- Stars
- 853
- Forks
- 322
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MIT-LCP/wfdb-python
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
MIT-LCP/wfdb-python#568 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
MIT-LCP/wfdb-python#557 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
MIT-LCP/wfdb-python#554 ·
-
WFDB path ignored Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MIT-LCP/wfdb-python#545 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
MIT-LCP/wfdb-python#540 ·
All issues in MIT-LCP/wfdb-python
Similar issues
-
bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fivetran/great_expectations#12253 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
correction metadata
Difficulty 1/5 Under an hour Newbie friendliness 78/100
acl-org/acl-anthology#10071 · 1 comment ·
-
data:css needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mdn/browser-compat-data#30618 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
basedosdados/pipelines#2095 ·