Replies: 1 comment
-
My current workaround is this but it feels a bit inefficient and verbose: from pint import UnitRegistry
u = UnitRegistry(system='mks')
v = UnitRegistry(system='imperial')
x = 0.1 * u.km
print(v.parse_expression(str(x)).to_base_units())
#> 109.3613298337708 yard |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Friends,
I have an internal model with mks units, but i want to present values to the user in a user selected unit system, so is there an easy way to present a quantity in an specific unit system base form?
for exampe:
Beta Was this translation helpful? Give feedback.
All reactions