Skip to content

Commit

Permalink
Always return a Python int as distance from _greedy_correct_assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
thequilo committed Aug 23, 2024
1 parent cd1a36f commit c00969d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meeteval/wer/matching/greedy_combination_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def compute_backward_columns(r, h):
# We know that the cost cannot increase, so check that we do correct
assert sum(old_stream_costs) >= sum(stream_costs), (old_stream_costs, stream_costs)

return assignment, np.sum(stream_costs)
return assignment, int(np.sum(stream_costs))


def initialize_assignment(
Expand Down Expand Up @@ -239,4 +239,4 @@ def greedy_combination_matching(
functools.partial(cy_forward_col, cost_substitution=int(d))
)

return int(distance), assignment
return distance, assignment

0 comments on commit c00969d

Please sign in to comment.