Skip to content

Commit

Permalink
make np.array compatible with numpy 2.0 (#3339)
Browse files Browse the repository at this point in the history
* make np.array compatible with numpy 2.0

* Update camera_utils.py
  • Loading branch information
Guangyun-Xu authored Jul 29, 2024
1 parent 8c87906 commit b0dd3d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nerfstudio/cameras/camera_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def quaternion_from_matrix(matrix: NDArray, isprecise: bool = False) -> np.ndarr
matrix: rotation matrix to obtain quaternion
isprecise: if True, input matrix is assumed to be precise rotation matrix and a faster algorithm is used.
"""
M = np.array(matrix, dtype=np.float64, copy=False)[:4, :4]
M = np.array(matrix, dtype=np.float64, copy=True)[:4, :4]
if isprecise:
q = np.empty((4,))
t = np.trace(M)
Expand Down

0 comments on commit b0dd3d4

Please sign in to comment.