Skip to content

Commit dc9ae78

Browse files
authored
[BUG FIX] Fix batched numpy 'euler_to_R' geom util. (Genesis-Embodied-AI#2306)
1 parent 25ead10 commit dc9ae78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

genesis/utils/geom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,9 +1677,9 @@ def _np_euler_to_R(rpy: np.ndarray, out: np.ndarray | None = None) -> np.ndarray
16771677
"""
16781678
assert rpy.ndim >= 1
16791679
if out is None:
1680-
out_ = np.empty((*rpy.shape[1:], 3, 3), dtype=rpy.dtype)
1680+
out_ = np.empty((*rpy.shape[:-1], 3, 3), dtype=rpy.dtype)
16811681
else:
1682-
assert out.shape == (*rpy.shape[1:], 3, 3)
1682+
assert out.shape == (*rpy.shape[:-1], 3, 3)
16831683
out_ = out
16841684

16851685
cos_rpy, sin_rpy = np.cos(rpy), np.sin(rpy)

0 commit comments

Comments
 (0)