quatinv#

torchspin.quatinv(q)[source]#

Invert a unit quaternion (= conjugate).

Parameters:

q (array_like, shape (4,) or (4, N)) – Unit quaternion(s).

Returns:

qinv (ndarray, same shape as *q*) – Inverse: [q0, -q1, -q2, -q3].

Return type:

ndarray