spectrochempy.Unit.from_¶
- Unit.from_(value, strict=True, name='value')[source]¶
Converts a numerical value or quantity to this unit
- 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 converted value as this unit