Operate and manipulate physical quantities in Python