jztools.humanize#
Functions
|
|
|
e.g., oom(1.4e-3, 's', ['m', 'u', 'n']) -> 1.4ms |
|
Format seconds. |
Classes
alias of |
- jztools.humanize.OrderOfMagnitude#
alias of
OrdersOfMagnitude
- jztools.humanize.oom_(val, prefixes=None)#
e.g., oom(1.4e-3, ‘s’, [‘m’, ‘u’, ‘n’]) -> 1.4ms
- Parameters:
prefixes – List of prefixes to consider. Can also be a string, but the two-character prefix ‘da’ will always be assumed excluded in favor of ‘d’ (deci) and ‘a’ (atto).
- jztools.humanize.oom(val, prefixes=None, unit='', sep=' ', format='.3g', align=False)#
- Parameters:
align – Left-pad all order prefixes with spaces so that they have the same length.
- jztools.humanize.secs(val, prefixes='mun', unit='s', **kwargs)#
Format seconds.