forallpeople
forallpeople copied to clipboard
Error using .to() converting ft to meters
Works fine converting from m to ft but I get this warning going the other way:
/.../forallpeople/init.py:164: UserWarning: No unit defined for 'm' on 1.000 ft. if not unit_match: warnings.warn(f"No unit defined for '{unit_name}' on {self}.") 304.800 mm
Hi @m-conway,
I think I should update the API so that this works. The intended approach was to use .to()
for converting to non-SI units and to use .si()
to revert the instance to SI units. However, I find myself often wanting to use .to()
to go both ways, especially when I am writing code that where I do not know if I am expecting an SI unit or a US unit. I will see if there is a quick way to implement this...