-
Notifications
You must be signed in to change notification settings - Fork 468
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
[question] making a unitless Quantity
#1333
Comments
Could you explain what exactly you're seeing? |
you're right! my bad -- I'm getting used to the differences between using what I meant to comment was assert Q_('1').units == ureg.dimensionless to indicate how lack-of-unit is parsed as 'dimensionless' and not 'unitless' assert Q_(1, None).units == ureg.dimensionless |
I do not follow. |
how does one define or use a unitless instance of
Quantity
?as distinct from a
Quantity
of unit 'dimensionless' which is returned when no unit is specifiedthe docs don't seem to mention their existence
I see that
Quantity
objects have aunitless
propertypint/pint/quantity.py
Lines 461 to 464 in 9fc752c
but it seems only to be used within
Quantity
here into_compact
pint/pint/quantity.py
Lines 760 to 766 in 9fc752c
and here
pint/pint/quantity.py
Lines 1789 to 1791 in 9fc752c
but after glancing about it's not apparent (to me) how one would even instantiate a unitless quantity, or otherwise what they'd be used for internally
I haven't yet fully inspected the
UnitsContainer
and its usage/references;is the
unitless
property used when working with those?possibly related #1277 regarding adding unitless dimensions
The text was updated successfully, but these errors were encountered: