pyunitwizard.quantity#
- pyunitwizard.quantity(value, unit=None, form=None, parser=None, standardized=False)[source]#
Returns a quantity.
- Parameters:
value (int, float or arraylike) – The value of the quantity. Can be a scalar or an array like type.
unit (UnitLike) – Unit in of the quantity in any of the accepted form.
form ({"unyt", "pint", "openmm.unit", "astropy.units", "string"}, optional) – Output form of the quantity.
parser ({"unyt", "pint", "openmm.unit", "astropy.units"}, optional) – The parser to use.
standardized (bool, optional) – Return a standardized quantity, default=False.
- Returns:
The quantity.
- Return type:
QuantityLike