You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behavior seems to violate reasonable assumptions (and differs from the behavior of pandas, where df['colname'] is the same as df.colname, presuming colname is a valid identifier.)
If this is intentional, it's unclear why it makes sense for ureg['year'] to return a Quantity.
The text was updated successfully, but these errors were encountered:
If you look at the code, this use case has been deprecated:
def __getitem__(self, item):
logger.warning(
"Calling the getitem method from a UnitRegistry is deprecated. "
"use `parse_expression` method or use the registry as a callable."
)
return self.parse_expression(item)
parse_expression returns a Quantity.
I agree with you on this, and since this deprecation is like 5 years old, we can safely do something about it.
So we can either remove this function or change it.
This behavior seems to violate reasonable assumptions (and differs from the behavior of pandas, where
df['colname']
is the same asdf.colname
, presumingcolname
is a valid identifier.)If this is intentional, it's unclear why it makes sense for
ureg['year']
to return a Quantity.The text was updated successfully, but these errors were encountered: