python
pip install quads
python
import quads
python
q1 = quads.Quaternion(1, 2, 3, 4)
python
real_part = q1.real
python
imaginary_part = q1.imaginary
python
q2 = quads.Quaternion(2, 2, 2, 2)
result = q1 + q2
python
result = q1 - q2
python
result = q1 * q2
python
normalized = q1.normalize()
python
conjugate = q1.conjugate()
python
inverse = q1.inverse()