pint
pint copied to clipboard
TypeError with measurements
I think this has something to do with using numpy with measurements. Perhaps it is not supposed to work: in this case error is not MISSING, but can't be compared to 0
https://github.com/hgrecco/pint/blob/208d36a5bb051465296dad846296bb19628e2307/pint/facets/measurement/objects.py#L70
68 if error is MISSING:
69 mag = value
---> 70 elif error < 0:
71 raise ValueError("The magnitude of the error cannot be negative")
72 else:
TypeError: '<' not supported between instances of 'UnitsContainer' and 'int'
Do you have a minimal example ?