From ed36956b0d4842e1bc524d4ade5a1842da539a1c Mon Sep 17 00:00:00 2001 From: Dries Marzougui Date: Mon, 5 Feb 2024 10:59:08 +0100 Subject: [PATCH] fix https://github.com/google-deepmind/mujoco/issues/1379 --- mjx/mujoco/mjx/_src/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mjx/mujoco/mjx/_src/io.py b/mjx/mujoco/mjx/_src/io.py index 91478ffd..b815c32c 100644 --- a/mjx/mujoco/mjx/_src/io.py +++ b/mjx/mujoco/mjx/_src/io.py @@ -286,7 +286,7 @@ def get_data_into( ncon = (d_i.contact.dist <= 0).sum() efc_active = (d_i.efc_J != 0).any(axis=1) efc_con = efc_type == mujoco.mjtConstraint.mjCNSTR_CONTACT_PYRAMIDAL - nefc, nc = efc_active.sum(), (efc_active & efc_con).sum() + nefc, nc = int(efc_active.sum()), int((efc_active & efc_con).sum()) result_i.nnzJ = nefc * m.nv mujoco._functions._realloc_con_efc(result_i, ncon=ncon, nefc=nefc) # pylint: disable=protected-access result_i.efc_J_rownnz[:] = np.repeat(m.nv, nefc)