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
{{ message }}
Repository navigation
Inheritance and instance-ship of astropy units unexpected #6517
Came across this while looking at older issues. The inheritance is confusing. As @pllim notes, the default would be to do ininstance(unit, u.UnitBase) but this does not capture logarithmic units. I think we do need the abstract type discussed in #3650 -- indeed, I'll close this in favour of that issue (I copied the example on the top to it).
Activity
pllim commentedon Sep 6, 2017
A workaround for now is either to use
or
pllim commentedon Sep 6, 2017
Not sure if this is a bug or by design but the inheritance diagram here might also help:
http://astropy.readthedocs.io/en/latest/units/index.html#id2
mhvk commentedon Apr 13, 2018
Came across this while looking at older issues. The inheritance is confusing. As @pllim notes, the default would be to do
ininstance(unit, u.UnitBase)but this does not capture logarithmic units. I think we do need the abstract type discussed in #3650 -- indeed, I'll close this in favour of that issue (I copied the example on the top to it).