>>> import pint; U = pint.UnitRegistry()
>>> round(1.1), type(round(1.1))
(1, <class 'int'>)
>>> round(1.1 * U.kg), type(round(1.1 * U.kg).magnitude)
(<Quantity(1.0, 'kilogram')>, <class 'float'>)
I'm not sure if this is a bug, but it certainly surprised me.
I'm not sure if this is a bug, but it certainly surprised me.