@@ -200,6 +200,10 @@ def test_bind(self):
200200 # test getting
201201 np .testing .assert_array_equal (mx .bind (s .bodies ).pos , m .body_pos )
202202 np .testing .assert_array_equal (dx .bind (mx , s .bodies ).xpos , d .xpos )
203+ np .testing .assert_array_equal (m .bind (s .bodies [0 ]).mass , m .body_mass [0 ])
204+ np .testing .assert_array_equal (m .bind (s .bodies [0 :1 ]).mass , [m .body_mass [0 ]])
205+ np .testing .assert_array_equal (mx .bind (s .bodies [0 ]).mass , m .body_mass [0 ])
206+ np .testing .assert_array_equal (mx .bind (s .bodies [0 :1 ]).mass , [m .body_mass [0 ]])
203207 for i in range (m .nbody ):
204208 np .testing .assert_array_equal (m .bind (s .bodies [i ]).pos , m .body_pos [i , :])
205209 np .testing .assert_array_equal (mx .bind (s .bodies [i ]).pos , m .body_pos [i , :])
@@ -224,6 +228,8 @@ def test_bind(self):
224228 np .testing .assert_array_equal (mx .bind (s .joints ).axis , m .jnt_axis )
225229 np .testing .assert_array_equal (mx .bind (s .joints ).qposadr , m .jnt_qposadr )
226230 np .testing .assert_array_equal (mx .bind (s .joints ).dofadr , m .jnt_dofadr )
231+ np .testing .assert_array_equal (dx .bind (mx , s .joints [1 ]).id , 1 )
232+ np .testing .assert_array_equal (dx .bind (mx , s .joints [1 :2 ]).id , [1 ])
227233 qposnum = [4 , 1 , 1 ] # one ball joint (4) and two slide joints (1)
228234 dofnum = [3 , 1 , 1 ] # one ball joint (3) and two slide joints (1)
229235 for i in range (m .njnt ):
0 commit comments