8000 islimit return ndarray not list · lars-x/robotics-toolbox-python@cb70179 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb70179

Browse files
committed
islimit return ndarray not list
1 parent 8dd48a2 commit cb70179

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_DHRobot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_theta(self):
102102
self.assertEqual(r0.theta, ans)
103103

104104
def test_r(self):
105-
r = np.array([[1], [2], [3]])
105+
r = np.r_[1, 2, 3]
106106
l0 = rp.PrismaticDH(r=r)
107107
l1 = rp.RevoluteDH(r=r)
108108
l2 = rp.PrismaticDH(r=r)
@@ -332,10 +332,10 @@ def test_islimit(self):
332332
q = [1, 2, 3, 4, 5, 6, 7]
333333
panda.q = q
334334

335-
ans = [False, True, True, True, True, True, True]
335+
ans = np.r_[False, True, True, True, True, True, True]
336336

337-
self.assertEqual(panda.islimit(q), ans)
338-
self.assertEqual(panda.islimit(), ans)
337+
nt.assert_array_equal(panda.islimit(q), ans)
338+
nt.assert_array_equal(panda.islimit(), ans)
339339

340340
def test_isspherical(self):
341341
l0 = rp.RevoluteDH()

0 commit comments

Comments
 (0)
0