-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Over at astropy, we've been thinking a bit of how to associate physical types with units, in a way that is backward compatible. For defining units explicitly, this may be fairly obvious, just have an extra "physical_type" keyword argument, and likely that is all we would want to fix for interoperation.
But I thought it might be good to mention that we're also thinking about possible short-cuts in unit calculations. As an option, we're wondering about (see astropy/astropy#18521 (comment)) using __getitem__ as a way for the user to tell what the intended physical type is. E.g.,
s = 1.23 * (u.J/u.K)["entropy"]
cv = 4.56 * (u.J/u.K)["heat capacity"]
Of course, another question is how this is used in actual calculations...
EDIT: Would be really happy to hear how other unit packages solve this!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels