Skip to content

Behavior for downcasting to numpy with reducable units (like mm/m) #1756

Answered by andrewgsavage
knightofni-i asked this question in Q&A
Discussion options

You must be logged in to vote

You probably want to turn auto_reduce_dimensions on

https://pint.readthedocs.io/en/stable/tutorial.html

If you want pint to automatically perform dimensional reduction when producing new quantities, the UnitRegistry class accepts a parameter auto_reduce_dimensions. Dimensional reduction can be slow, so auto-reducing is disabled by default.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hgrecco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1180 on April 27, 2023 03:30.