mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 14:58:55 +08:00
Add explicit dtype
This commit is contained in:
1 parent
080eef4d78
commit
a979e916c1
1 file changed
+1
-1
@@ -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[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
|
rotation_mat = math.cos(theta) * ident + (1 - math.cos(theta)) * r_rT + math.sin(theta) * r_cross
|
||||||
return rotation_mat
|
return rotation_mat
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user