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

Function qinv

mogen/utils/plot_utils.py:40–44  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

38
39
40def qinv(q):
41 assert q.shape[-1] == 4, 'q must be a tensor of shape (*, 4)'
42 mask = torch.ones_like(q)
43 mask[..., 1:] = -mask[..., 1:]
44 return q * mask
45
46
47def qrot(q, v):

Callers 2

recover_root_rot_posFunction · 0.70
recover_from_ricFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected