Add explicit dtype

This commit is contained in:
Piero Toffanin committed 2023-10-12 18:16:16 -04:00
1 parent 080eef4d78
commit a979e916c1
1 file changed
+1 -1
+1 -1
View File
@@ -40,7 +40,7 @@ def rodrigues_vec_to_rotation_mat(rodrigues_vec: np.ndarray) -> np.ndarray:
[r[2] * r[0], r[2] * r[1], r[2] * r[2]],
]
)
r_cross = np.array([[0, -r[2], r[1]], [r[2], 0, -r[0]], [-r[1], r[0], 0]])
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
return rotation_mat