Skip to content

Commit

Permalink
Fix string exception handling for Windows and Py27
Browse files Browse the repository at this point in the history
  • Loading branch information
flennerhag committed Feb 12, 2018
1 parent 611b77e commit 736d530
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlens/metrics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _get_string(obj, dec):
"""Stringify object"""
try:
return '{0:.{dec}f}'.format(obj, dec=dec)
except TypeError:
except (TypeError, ValueError):
return obj.__str__()


Expand Down

0 comments on commit 736d530

Please sign in to comment.