spectrochempy.Unit.m_from¶
- Unit.m_from(value, strict=True, name='value')[source]¶
Converts a numerical value or quantity to this unit, then returns the magnitude of the converted value
- Parameters
value – a Quantity (or numerical value if strict=False) to convert
strict – boolean to indicate that only quantities are accepted (Default value = True)
name – descriptive name to use if an exception occurs (Default value = “value”)
- Returns
type – The magnitude of the converted value