Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 757a088

Browse filesBrowse files
committed
reflect change to tr2jac
1 parent 384be82 commit 757a088
Copy full SHA for 757a088

File tree

Expand file treeCollapse file tree

1 file changed

+3
-18
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-18
lines changed

‎tests/base/test_transforms3d.py

Copy file name to clipboardExpand all lines: tests/base/test_transforms3d.py
+3-18Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -472,38 +472,23 @@ def test_delta2tr(self):
472472
def test_tr2jac(self):
473473

474474
# NOTE, create these matrices using pyprint() in MATLAB
475-
nt.assert_array_almost_equal(tr2jac(trotx(pi / 2)),
475+
# TODO change to forming it from block R matrices directly
476+
nt.assert_array_almost_equal(tr2jac(trotx(pi / 2)).T,
476477
np.array([[1, 0, 0, 0, 0, 0],
477478
[0, 0, 1, 0, 0, 0],
478479
[0, -1, 0, 0, 0, 0],
479480
[0, 0, 0, 1, 0, 0],
480481
[0, 0, 0, 0, 0, 1],
481482
[0, 0, 0, 0, -1, 0]]))
482483

483-
nt.assert_array_almost_equal(tr2jac(trotx(pi / 2), True),
484-
np.array([[1, 0, 0, 0, 0, 0],
485-
[0, 0, 1, 0, 0, 0],
486-
[0, -1, 0, 0, 0, 0],
487-
[0, 0, 0, 1, 0, 0],
488-
[0, 0, 0, 0, 0, 1],
489-
[0, 0, 0, 0, -1, 0]]))
490-
491-
nt.assert_array_almost_equal(tr2jac(transl(1, 2, 3)),
484+
nt.assert_array_almost_equal(tr2jac(transl(1, 2, 3)).T,
492485
np.array([[1, 0, 0, 0, 0, 0],
493486
[0, 1, 0, 0, 0, 0],
494487
[0, 0, 1, 0, 0, 0],
495488
[0, 0, 0, 1, 0, 0],
496489
[0, 0, 0, 0, 1, 0],
497490
[0, 0, 0, 0, 0, 1]]))
498491

499-
nt.assert_array_almost_equal(tr2jac(transl(1, 2, 3), True),
500-
np.array([[1, 0, 0, 0, 3, -2],
501-
[0, 1, 0, -3, 0, 1],
502-
[0, 0, 1, 2, -1, 0],
503-
[0, 0, 0, 1, 0, 0],
504-
[0, 0, 0, 0, 1, 0],
505-
[0, 0, 0, 0, 0, 1]]))
506-
507492
# test with scalar value
508493
# verifyError(tc, @()tr2jac(1),'SMTB:t2r:badarg');
509494

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.