Calling fully_cancel() on a quantity with a compound unit returns an error.
>>> from quanstants import units as qu
>>> (3 * qu.m).fully_cancel() # works fine
Quantity(3, m)
>>> ((3 * qu.m) / (2 * qu.s)).fully_cancel()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/matt/python/quanstants/quanstants/quantity.py", line 698, in fully_cancel
return self.number * self.unit.fully_cancel()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/matt/python/quanstants/quanstants/unit.py", line 519, in fully_cancel
first = cancelled.components[0]
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Quantity' object has no attribute 'components'
Calling
fully_cancel()
on a quantity with a compound unit returns an error.