From 2744a28d378022cb79555a6f941580c24d2cbf90 Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Fri, 21 Nov 2014 12:16:15 +0100 Subject: [PATCH] Revert "Update util.py" This reverts commit f1feb772d782708b2114a1cb4b529775853e7dd4. Conflicts: pygal/util.py --- pygal/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygal/util.py b/pygal/util.py index b671f16..ef44f77 100644 --- a/pygal/util.py +++ b/pygal/util.py @@ -40,7 +40,7 @@ def humanize(number): """Format a number to engineer scale""" if is_list_like(number): return', '.join(map(humanize, number)) - order = number and int(log10(abs(number)) / 3.0) + order = number and int(floor(log(abs(number)) / log(1000))) human_readable = ORDERS.split(" ")[int(order > 0)] if order == 0 or order > len(human_readable): return float_format(number / (1000 ** int(order)))