From cd99fbd59dc75fa8be97fe90a391d2055ee0a4d6 Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Mon, 23 Jan 2023 07:03:54 -0800 Subject: [PATCH] Fix test failures under NumPy 1.24. The use of `np.empty` triggers an msan use-of-uninitialized-value error when upgraded. PiperOrigin-RevId: 503975799 Change-Id: I337c8227c8c1e3bd415d7a798fc5e764c88c0875 --- python/mujoco/bindings_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mujoco/bindings_test.py b/python/mujoco/bindings_test.py index c4544d7a..16b56546 100644 --- a/python/mujoco/bindings_test.py +++ b/python/mujoco/bindings_test.py @@ -645,7 +645,7 @@ class MuJoCoBindingsTest(parameterized.TestCase): # Check that the res argument must have the right size. with self.assertRaises(TypeError): - mujoco.mju_rotVecQuat(np.empty(4, np.float64), vec, quat) + mujoco.mju_rotVecQuat(np.zeros(4, np.float64), vec, quat) # Check that the vec argument must have the right size. with self.assertRaises(TypeError):