-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
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
reduce_units? #2076
Comments
https://pint.readthedocs.io/en/stable/getting/tutorial.html#simplifying-units
it'll reduce m and mm. megawatt * hour are treated as MW and hour, which have different dimensionality to megawatthour so won't reduce try using to_base_units or to_preffered |
Thanks for that fast reply. I think One follow-up question if I may, as I cannot find it in the docs. If I set |
It's in the docs, ureg.default_preferred_units
…On Sat, 9 Nov 2024, 17:37 rwijtvliet, ***@***.***> wrote:
Thanks for that fast reply. I think to_preferred is actually what I want.
One follow-up question if I may, as I cannot find it in the docs.
If I set autoconvert_to_preferred=True when initialising a unit registry
- where do I specify, what those preferred units are?
—
Reply to this email directly, view it on GitHub
<#2076 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADEMLEFUHC6OMIHKNW2O7NDZ7ZB6PAVCNFSM6AAAAABRPHDSW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRWGMYDQNJXGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Using these definitions:
I often get into a situation where a quantity has redundant units, even though
auto_reduce_dimensions
is set toTrue
. For example:Is there an issue with my config?
I know I can do
revenue.to('Eur')
, but I'd like to avoid having to do this.The text was updated successfully, but these errors were encountered: