MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / qinv

Function qinv

text2motion/utils/quaternion.py:16–20  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

14
15# PyTorch-backed implementations
16def qinv(q):
17 assert q.shape[-1] == 4, 'q must be a tensor of shape (*, 4)'
18 mask = torch.ones_like(q)
19 mask[..., 1:] = -mask[..., 1:]
20 return q * mask
21
22
23def qinv_np(q):

Callers 4

qinv_npFunction · 0.85
qslerpFunction · 0.85
recover_root_rot_posFunction · 0.85
recover_from_ricFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected