ansys / pyansys-units

Pythonic interface for units, unit systems, and unit conversions.
http://units.docs.pyansys.com/
MIT License
6 stars 2 forks source link

fix: Dimensions less division units #260

Closed hpohekar closed 7 months ago

hpohekar commented 7 months ago
>>> from ansys.units import Quantity, Unit
>>> length_1 = Quantity(50, "mm")
>>> length_2 = Quantity(40, "inch")
>>> length_1 / length_2
Quantity (1.25, "mm inch^-1")

>>> t = Quantity(1, "mm^0")
>>> t
Quantity (1.0, "")

>>> j = Quantity(1.0, "m^0 kg")
>>> j
Quantity (1.0, "kg")
>>>