Quaternion library with numpy support