Skip to content

Commit 4528a06

Browse files
committed
doco and forced clip of s for matrix interpolation
1 parent be5a918 commit 4528a06

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎spatialmath/super_pose.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def interp(self, s=None, start=None):
368368
:param start: initial pose
369369
:type start: same as ``self``
370370
:param s: interpolation coefficient, range 0 to 1
371-
:type s: float or array_like
371+
:type s: array_like
372372
:return: interpolated pose
373373
:rtype: SO2, SE2, SO3, SE3 instance
374374
@@ -414,6 +414,8 @@ def interp(self, s=None, start=None):
414414
:SymPy: not supported
415415
"""
416416
s = base.getvector(s)
417+
s = np.clip(s, 0, 1)
418+
417419
if start is not None:
418420
assert len(start) == 1, 'len(start) must == 1'
419421
start = start.A

0 commit comments

Comments
 (0)