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
Does Pint support exponentiation?
Suppose I have any unit:
from pint import UnitRegistry u = UnitRegistry() x = u('W^2/m^2')
I would like to compute (possibly non-integers) power of units. For example:
y = x ^ (1.0/2) # unsupported operand type(s) for ^: 'Quantity' and 'float'
with the expectation that
y == u('W/m')
The text was updated successfully, but these errors were encountered:
In python exponentiation operator is ** not ^ (which is a logical operator).
Sorry, something went wrong.
You're right, of course. Late night; I was tired.
Great job on Pint!
No branches or pull requests
Does Pint support exponentiation?
Suppose I have any unit:
I would like to compute (possibly non-integers) power of units. For example:
with the expectation that
The text was updated successfully, but these errors were encountered: