Skip to content

Commit 6028058

Browse files
sibocwcopybara-github
authored andcommitted
dm_control: Import of refs/pull/476/head
PiperOrigin-RevId: 645030639 Change-Id: I29445854cd14c7cb7dcdef94754bd3e2cd8e1bf3
1 parent 0d35c66 commit 6028058

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

dm_control/composer/entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def shift_pose(self,
521521
if position is not None:
522522
new_position = current_position + position
523523
if quaternion is not None:
524-
quaternion = np.array(quaternion, dtype=np.float64, copy=False)
524+
quaternion = np.asarray(quaternion, dtype=np.float64)
525525
new_quaternion = _multiply_quaternions(quaternion, current_quaternion)
526526
root_joint = mjcf.get_frame_freejoint(self.mjcf_model)
527527
if root_joint and rotate_velocity:

dm_control/mujoco/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def convert_key_item(self, key_item):
355355

356356
elif isinstance(key_item, (list, np.ndarray)):
357357
# Cast lists to numpy arrays.
358-
key_item = np.array(key_item, copy=False)
358+
key_item = np.asarray(key_item)
359359
original_shape = key_item.shape
360360

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

0 commit comments

Comments
 (0)