convert_to_base_units

caqtus.types.units.base.convert_to_base_units(magnitude: M, unit: None) tuple[M, None]
caqtus.types.units.base.convert_to_base_units(
magnitude: M,
unit: Unit,
) tuple[M, BaseUnit | None]

Convert values into base units.

Parameters:
  • magnitude – The value to convert. Can be a scalar or an array of values.

  • unit – The unit in which the magnitude is expressed.

Returns:

The magnitude in base units and the base units.