Rename nnzJ to nJ in mjData.

This naming is more consistent.

PiperOrigin-RevId: 691858223
Change-Id: Ife3db822afa0b51b30d0792548b35b3742da388a
This commit is contained in:
Yuval Tassa
2024-10-31 10:42:29 -07:00
committed by Copybara-Service
parent 554641060b
commit c9f78ad8a8
10 changed files with 33 additions and 34 deletions
+1 -1
View File
@@ -408,7 +408,7 @@ def get_data_into(
ncon = (d_i.contact.dist <= 0).sum()
efc_active = (d_i.efc_J != 0).any(axis=1)
nefc = int(efc_active.sum())
result_i.nnzJ = nefc * m.nv
result_i.nJ = nefc * m.nv
if ncon != result_i.ncon or nefc != result_i.nefc:
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)