Skip to content

Commit

Permalink
dm_control: Import of refs/pull/476/head
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 645030639
Change-Id: I29445854cd14c7cb7dcdef94754bd3e2cd8e1bf3
  • Loading branch information
sibocw authored and copybara-github committed Jun 20, 2024
1 parent 0d35c66 commit 6028058
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dm_control/composer/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def shift_pose(self,
if position is not None:
new_position = current_position + position
if quaternion is not None:
quaternion = np.array(quaternion, dtype=np.float64, copy=False)
quaternion = np.asarray(quaternion, dtype=np.float64)
new_quaternion = _multiply_quaternions(quaternion, current_quaternion)
root_joint = mjcf.get_frame_freejoint(self.mjcf_model)
if root_joint and rotate_velocity:
Expand Down
2 changes: 1 addition & 1 deletion dm_control/mujoco/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def convert_key_item(self, key_item):

elif isinstance(key_item, (list, np.ndarray)):
# Cast lists to numpy arrays.
key_item = np.array(key_item, copy=False)
key_item = np.asarray(key_item)
original_shape = key_item.shape

# We assume that either all or none of the items in the array are strings
Expand Down

0 comments on commit 6028058

Please sign in to comment.