Open XZF0 opened 3 weeks ago
import pint import decimal ureg = pint.UnitRegistry(non_int_type=decimal.Decimal) y = ureg.Quantity('1.2345', 'm') print(y.to('cm')) #>>> TypeError: can't multiply sequence by non-int of type 'decimal.Decimal' ureg = pint.UnitRegistry(non_int_type=decimal.Decimal) y = ureg.Quantity(1.2345, 'm') print(y.to('cm')) #>>> TypeError: unsupported operand type(s) for *: 'float' and 'decimal.Decimal'