weldx.Q_.to_compact¶
- Q_.to_compact(unit=None)¶
“Return Quantity rescaled to compact, human-readable units.
To get output in terms of a different unit, use the unit parameter.
Example
>>> import pint >>> ureg = pint.UnitRegistry() >>> (200e-9*ureg.s).to_compact() <Quantity(200.0, 'nanosecond')> >>> (1e-2*ureg('kg m/s^2')).to_compact('N') <Quantity(10.0, 'millinewton')>