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 2f513b0

Browse filesBrowse files
committed
make symbolic friendly
1 parent f64bd80 commit 2f513b0
Copy full SHA for 2f513b0

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

‎spatialmath/base/transforms3d.py

Copy file name to clipboardExpand all lines: spatialmath/base/transforms3d.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,13 @@ def transl(x, y=None, z=None):
296296
elif base.isvector(x, 3):
297297
t = base.getvector(x, 3, out='array')
298298
elif base.ismatrix(x, (4, 4)):
299+
# SE(3) -> R3
299300
return x[:3, 3]
300301
else:
301302
raise ValueError('bad argument')
303+
304+
if t.dtype != 'O':
305+
t = t.astype('float64')
302306

303307
T = np.identity(4, dtype=t.dtype)
304308
T[:3, 3] = t

0 commit comments

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