Skip to content

Commit

Permalink
fix try for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMay committed Jan 2, 2024
1 parent b877269 commit d40b8b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mltb2/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ def _load_colon_label() -> pd.Series:
page_text_lines = page_text.splitlines()

label = []
try:
for line in page_text_lines:
for line in page_text_lines:
try:
i = int(line)
label.append(0 if i > 0 else 1)
except ValueError:
pass # we ignore this
except ValueError:
pass # we ignore this

assert len(label) == 62
label_series = pd.Series(label)
Expand Down

0 comments on commit d40b8b1

Please sign in to comment.