Post · 1 min read· p. 143

Quaternion.v

Quaternion.v : Vector part of the Quaternion.

code
Given a quaternion q=(qwqxqyqz)\mathbf{q}=\begin{pmatrix}q_w & q_x & q_y & q_z\end{pmatrix}
the vector part, a.k.a. *imaginary* part, is
qv=[qxqyqz]\mathbf{q}_v=\begin{bmatrix}q_x & q_y & q_z\end{bmatrix}.

Returns:
:   **q\_v** – Vector part of the quaternion.

Return type:
:   numpy.ndarray

Examples

```default

q = Quaternion([2.0, -3.0, 4.0, -5.0]) q.view() Quaternion([ 0.27216553, -0.40824829, 0.54433105, -0.68041382])

q.v array([-0.40824829, 0.54433105, -0.68041382])

code

    It can also be accessed directly, treating the Quaternion as an array,
    but is returned as a Quaternion object.

    ```default
>>> q[1:]
Quaternion([-0.40824829,  0.54433105, -0.68041382])