-
Notifications
You must be signed in to change notification settings - Fork 14
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
Expose units symbol & name on KeyData objects #449
Conversation
(oh, and this should probably be documented too) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks! prnote: New properties |
LGTM! Some time ago I scanned over several runs and found only |
As two new properties,
.units
and.units_name
. These combine the unit & metric prefix attributes written by Karabo to give symbols like 'μJ' or 'fs'. They will beNone
if these attributes aren't available. Pint recognises either the symbol or the name (for the couple of cases I tried).There's no caching at present. I assume people won't retrieve units many times for the same key, and the OS disk cache could help a bit anyway.