|
|
@ -38,6 +38,8 @@ def float_format(number): |
|
|
|
|
|
|
|
|
|
|
|
def humanize(number): |
|
|
|
def humanize(number): |
|
|
|
"""Format a number to engineer scale""" |
|
|
|
"""Format a number to engineer scale""" |
|
|
|
|
|
|
|
if is_list_like(number): |
|
|
|
|
|
|
|
return', '.join(map(humanize, number)) |
|
|
|
order = number and int(floor(log(abs(number)) / log(1000))) |
|
|
|
order = number and int(floor(log(abs(number)) / log(1000))) |
|
|
|
human_readable = ORDERS.split(" ")[int(order > 0)] |
|
|
|
human_readable = ORDERS.split(" ")[int(order > 0)] |
|
|
|
if order == 0 or order > len(human_readable): |
|
|
|
if order == 0 or order > len(human_readable): |
|
|
|