Skip to content

Commit

Permalink
Merge branch 'hotfix/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
hbredin committed Apr 15, 2019
2 parents efa42b9 + d8d6c61 commit b433fec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
#########

Version 2.0.2 (2019-04-15)
~~~~~~~~~~~~~~~~~~~~~~~~~~

- fix: avoid division by zero

Version 2.0.1 (2019-03-20)
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
6 changes: 5 additions & 1 deletion pyannote/metrics/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@ def report(self, display=False):
else:
row[key, ''] = value
if percent:
row[key, '%'] = 100 * value / total
if total > 0:
row[key, '%'] = 100 * value / total
else:
row[key, '%'] = np.NaN

row[self.name, '%'] = 100 * abs(self)
report.append(row)
uris.append('TOTAL')
Expand Down

0 comments on commit b433fec

Please sign in to comment.