spectrochempy.Unit¶
- class Unit(*args, **kwargs)[source]¶
Methods
Unit.from_
(value[, strict, name])Converts a numerical value or quantity to this unit
Unit.is_compatible_with
(self, other, ...)check if the other object is compatible
Unit.m_from
(value[, strict, name])Converts a numerical value or quantity to this unit, then returns the magnitude of the converted value
Attributes
Default formatting string.
returns: dict -- Dimensionality of the PlainUnit, e.g.
Return True if the PlainUnit is dimensionless; False otherwise.
- default_format = ''¶
Default formatting string.
- dimensionality¶
returns: dict – Dimensionality of the PlainUnit, e.g.
{length: 1, time: -1}
- dimensionless¶
Return True if the PlainUnit is dimensionless; False otherwise.