(q, inplace=False)
| 29 | |
| 30 | |
| 31 | def qinverse(q, inplace=False): |
| 32 | if inplace: |
| 33 | q[..., 1:] *= -1 |
| 34 | return q |
| 35 | else: |
| 36 | w = q[..., :1] |
| 37 | xyz = q[..., 1:] |
| 38 | return torch.cat((w, -xyz), dim=len(q.shape) - 1) |
| 39 | |
| 40 | |
| 41 | def wrap(func, *args, unsqueeze=False): |
nothing calls this directly
no outgoing calls
no test coverage detected