Add explicit dtype

This commit is contained in:
Piero Toffanin committed 2023-10-12 18:16:45 -04:00
1 parent a979e916c1
commit 6f3cde1671
1 file changed
+2 -1
+2 -1
View File
@@ -38,7 +38,8 @@ def rodrigues_vec_to_rotation_mat(rodrigues_vec: np.ndarray) -> np.ndarray:
[r[0] * r[0], r[0] * r[1], r[0] * r[2]],
[r[1] * r[0], r[1] * r[1], r[1] * r[2]],
[r[2] * r[0], r[2] * r[1], r[2] * r[2]],
]
],
dtype=float
)
r_cross = np.array([[0, -r[2], r[1]], [r[2], 0, -r[0]], [-r[1], r[0], 0]], dtype=float)
rotation_mat = math.cos(theta) * ident + (1 - math.cos(theta)) * r_rT + math.sin(theta) * r_cross