wrann ValueError
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
Research direction
Start at wfdb/io/annotation.py line 943 in wr_ann_file and reproduce the annotation-saving path described in the report. Check how fs_bytes and cl_bytes are represented before the empty-value comparison; done means saving annotations no longer raises the reported NumPy broadcasting ValueError.
Written by the indexing model from the issue text.
Description
When saving annotations, I get this error in wrann:
File "C:\Users\######\venv\Lib\site-packages\wfdb\io\annotation.py", line 943, in wr_ann_file
if fs_bytes == [] and cl_bytes == []:
^^^^^^^^^^^^^^
ValueError: operands could not be broadcast together with shapes (28,) (0,)
This error is raised when fs_bytes (or cl_bytes) is a numpy ndarray that is compared to the empty list.
A possible solution may be, to cast the arrays to lists and then compare them:
if list(fs_bytes) == [] and list(cl_bytes) == []:
(WFDB Version: 4.1.2, Python 3.11)
- 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
removeToken
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cowprotocol/token-lists#1514 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
anomalyco/models.dev#7670 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
cisagov/cyhy-reports#149 · 3 comments ·
-
remove entry
Difficulty 1/5 Under an hour Newbie friendliness 74/100