Hi, it would be really cool if it was possible to get what kind of physical quantity a certain dimensionality represents, for instance if a unit is kg*m/s^2 you could get the string "force". For example:
F = ureg['N']
"{:what}".format(F.u) # returns "force"
# or
F.u.what() # returns ["force"]
I realize this is not trivial. It would require some sort of dictionary of combination of units, and mappings to what they are. Perhaps some combinations could be several things? In which case you would need to return a list. All possible combinations could of course not be covered, but one could cover relatively standard ones as a beginning: length, speed, acceleration, distance, force, temperature, magnetic flux density, and so forth.
Hi, it would be really cool if it was possible to get what kind of physical quantity a certain dimensionality represents, for instance if a unit is kg*m/s^2 you could get the string "force". For example:
I realize this is not trivial. It would require some sort of dictionary of combination of units, and mappings to what they are. Perhaps some combinations could be several things? In which case you would need to return a list. All possible combinations could of course not be covered, but one could cover relatively standard ones as a beginning: length, speed, acceleration, distance, force, temperature, magnetic flux density, and so forth.