pyphi.display.numbers.format_value#

pyphi.display.numbers.format_value(value, sig_figs=6)[source]#

Format a value for display.

Real (non-integer) numbers are rounded to sig_figs significant figures and always keep a decimal point (so continuous quantities read consistently). Integers — counts, indices — render without one. Everything else is rendered with str. The exact numeric value remains available on the source object’s attribute.

Parameters:

sig_figs (int)

Return type:

str