hgrecco / pint-pandas

Pandas support for pint
Other
172 stars 42 forks source link

PintArray fails to convert listlike with mixed units correctly #86

Closed burnpanck closed 2 years ago

burnpanck commented 3 years ago

The following example highlights the issue:

import pint_pandas

ureg = pint_pandas.PintType.ureg

a = PintArray([1,2]*ureg.m, ureg.m)
b = [1*ureg.km,1*ureg.m]
c = a+b
print(c.quantity)
# will print "[1001.0 1002.0] meter" instead of "[1001.0 3.0] meter"
burnpanck commented 2 years ago

Closed with PR #87