Skip to content

Commit

Permalink
type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Dec 11, 2024
1 parent e942b04 commit 24053fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/viser/_viser.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ def _update_wxyz(self) -> None:
y = y - np.dot(z, y) * z
y /= np.linalg.norm(y)
x = np.cross(y, z)
self._state.wxyz = tf.SO3.from_matrix(np.stack([x, y, z], axis=1)).wxyz
self._state.wxyz = tf.SO3.from_matrix(np.stack([x, y, z], axis=1)).wxyz.astype(
np.float64
)

@property
def fov(self) -> float:
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def assert_transforms_close(a: vtf.MatrixLieGroup, b: vtf.MatrixLieGroup):
assert_arrays_close(p1, p2)


def assert_arrays_close(*arrays: Union[npt.NDArray[np.float64], float]):
def assert_arrays_close(*arrays: Union[npt.NDArray[np.floating], float]):
"""Make sure two arrays are close. (and not NaN)"""
for array1, array2 in zip(arrays[:-1], arrays[1:]):
assert np.asarray(array1).dtype == np.asarray(array2).dtype
Expand Down

0 comments on commit 24053fe

Please sign in to comment.