finesse.utilities.text.scale_si

finesse.utilities.text.scale_si(number, units=None)[source]

Convert number to an SI-scaled string representation, with optional unit.

Examples

>>> scale_si(123.45e-6)
'123.45u'
>>> scale_si(370e-6, units="m")
'370 um'