pyunitwizard.get_value#
- pyunitwizard.get_value(quantity, to_unit=None, parser=None, standardized=False)[source]#
Returns the value of a quantity.
- Parameters:
to_unit (str, optional) – Name of the unit to which the quantity will be converted (i.e kcal/mol).
parser ({"unyt", "pint", "openmm.unit", "astropy.units"}, optional) – The parser to use.
quantity (QuantityLike)
standardized (bool | None)
- Returns:
An array with the quantity value or a a float or an int if it’s a scalar.
- Return type:
np.ndarray or float or int