from pint import UnitRegistry
ureg = UnitRegistry(autoconvert_offset_to_baseunit=True)
print(100 == ureg.Quantity(100)) # True
celsius = ureg.Quantity("celsius")
hundred_celsius = 100 * celsius
print(hundred_celsius) # 100 C
hundred_celsius = ureg.Quantity(100) * celsius
print(hundred_celsius) # 27414 kelvin
Given Quantity(100) is equal to the int/float 100, I'd expect it to behave the same when multiplying by an offset unit, but it seems to autoconvert to kelvin instead, and only then multiply by a 100.
Given Quantity(100) is equal to the int/float 100, I'd expect it to behave the same when multiplying by an offset unit, but it seems to autoconvert to kelvin instead, and only then multiply by a 100.