Physical quantities

Physical quantities.

class sympy.physics.unitsystems.quantities.Quantity[source]

Physical quantity.

A quantity is defined from a factor and a unit.

add(other)[source]

Add two quantities.

If the other object is not a quantity, raise an error. Two quantities can be added only if they have the same unit: so we convert first the other quantity to the same unit and, if it succedded, then we add the factors.

as_unit

Convert the quantity to a unit.

convert_to(unit)[source]

Convert the quantity to another (compatible) unit.