Python implementation of quaternions.