Check if a quantity is within some measurement in pint in python

462 views Asked by At

I want to check whether a single quantity is within a measurement. Or if a measurement is within a measurement. ie, this should return True:

import pint
u=pint.UnitRegistry()
a=(1*u.m).plus_minus(0.1, relative=True)
(1.05*u.m).within(a) 

Is this functionality/use case at all supported?

0

There are 0 answers