mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 02:24:38 +08:00
make np.array compatible with numpy 2.0 (#3339)
* make np.array compatible with numpy 2.0 * Update camera_utils.py
This commit is contained in:
parent
8c87906971
commit
b0dd3d4730
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user