We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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'
The text was updated successfully, but these errors were encountered:
import pint import decimal ureg = pint.UnitRegistry(non_int_type=decimal.Decimal) y = ureg.Quantity(decimal.Decimal(1.2345), 'm') print(y.to('cm')) 123.4499999999999930722083263 centimeter
Looks like the parser should convert the text number to decimal here
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: