cavcalc.output.SingleOutput.convert#

SingleOutput.convert(units)#

Attempts to convert the result quantity, in-place, to the specified units.

Warning

This method converts the actual quantity held by this output. If you do not want to modify this object, then instead do:

q = out.result.to(units)

to get a new quantity object, q, in the given units.

Parameters:
unitsstr

The units to convert to, as a string or cavcalc.ureg.<units> object.