utils.units module

IMTreatment.utils.units.make_unit(string)[source]

Function helping for the creation of units. For more details, see the Unum module documentation.

Parameters:string (string) – String representing some units.
Returns:unit – unum object representing the given units
Return type:unum.Unum object

Examples

>>> make_unit("m/s")
1 [m/s]
>>> make_unit("N/m/s**3")
1 [kg/s4]
IMTreatment.utils.units.make_unit_old(string)[source]

Function helping for the creation of units. For more details, see the Unum module documentation.

Parameters:string (string) – String representing some units.
Returns:unit – unum object representing the given units
Return type:unum.Unum object

Examples

>>> make_unit("m/s")
1 [m/s]
>>> make_unit("N/m/s**3")
1 [kg/s4]