Skip to content

Feature request: What kind of quantity a unit represents #676

@sigvaldm

Description

@sigvaldm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions