Skip to content

Commit c0f1b12

Browse files
author
Benjamin Moody
committed
Merge pull request #459 into main.
Fix incorrect comparisons between lists and numpy arrays in wr_ann_file. Additionally, drop python 3.7 (apparently broken on github, and now EOL) from the github workflow test matrix, and add python 3.11.
2 parents 870d792 + 481eb45 commit c0f1b12

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/run-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [windows-latest, ubuntu-latest, macos-latest]
20-
python-version: ["3.7", "3.8", "3.9", "3.10"]
20+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2121
steps:
2222
- uses: actions/checkout@v2
2323
- name: Set up Python ${{ matrix.python-version }}

wfdb/io/annotation.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -940,10 +940,10 @@ def wr_ann_file(self, write_fs, write_dir=""):
940940
core_bytes = self.calc_core_bytes()
941941

942942
# Mark the end of the special annotation types if needed
943-
if fs_bytes == [] and cl_bytes == []:
944-
end_special_bytes = []
945-
else:
943+
if len(fs_bytes) or len(cl_bytes):
946944
end_special_bytes = [0, 236, 255, 255, 255, 255, 1, 0]
945+
else:
946+
end_special_bytes = []
947947

948948
# Write the file
949949
with open(

0 commit comments

Comments
 (0)