"vscode:/vscode.git/clone" did not exist on "d80ef3e21d183723b1135cea3579740b7c200ed7"
Commit cd41d73f authored by Gustaf Ahdritz's avatar Gustaf Ahdritz
Browse files

Add shape assertion to rotation code

parent 253aff64
...@@ -74,9 +74,7 @@ def rot_vec_mul( ...@@ -74,9 +74,7 @@ def rot_vec_mul(
Returns: Returns:
[*, 3] rotated coordinates [*, 3] rotated coordinates
""" """
x = t[..., 0] x, y, z = torch.unbind(t, dim=-1)
y = t[..., 1]
z = t[..., 2]
return torch.stack( return torch.stack(
[ [
r[..., 0, 0] * x + r[..., 0, 1] * y + r[..., 0, 2] * z, r[..., 0, 0] * x + r[..., 0, 1] * y + r[..., 0, 2] * z,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment