-
Notifications
You must be signed in to change notification settings - Fork 49
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
Arithmetical operations between unit systems are not commutative for user defined units #148
Comments
Just a head’s up that I’m taking time off from code development, if you all need this fixed for yt then a PR implementing a fix would be probably the quickest way to get a fix merged. |
Also from what I remember we did add |
|
Well the example you used was with Would the same issue not happen with yt.units on the current master branch, I would think that even before unyt both sides would need to have the dataset’s unit registry to know about The reason I’m pushing back on this a bit is because it might be expensive to first check if the unit exists in the registry (a PR and benchmarks proving otherwise would change me mind though) and I think we were happy to work around that with yt.units. Could be wrong though, haven’t explicitly checked. |
Hey, glad you're taking some time off. This suggestion has given me something to look into, so I'm trying to take a crack at it here before asking for anything else -- the issue we are actually seeing is the Enjoy your time away! |
Description
Order of operations (addition or multiplication) on quantities using two different unit systems for user defined units works only if user defined unit is used first.
As an example:
yields
The text was updated successfully, but these errors were encountered: