8000 updates based on review comments · bdaiinstitute/spatialmath-python@b848e7b · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit b848e7b

Browse files
committed
updates based on review comments
1 parent 336fbc8 commit b848e7b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spatialmath/baseposematrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ def _op2(left, right: Self, op: Callable): # pylint: disable=no-self-argument
16571657
========= ========== ==== ================================
16581658
16591659
"""
1660-
if right.__class__ is left.__class__:
1660+
if isinstance(right, left.__class__) or isinstance(left, right.__class__):
16611661
# class by class
16621662
if len(left) == 1:
16631663
if len(right) == 1:

tests/test_pose3d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,14 +1286,14 @@ def test_angle(self):
12861286
p1a.angdist(other=p2b, metric=metric),
12871287
)
12881288
# not allowing angdist between mismatched types
1289-
with self.assertRaises(TypeError):
1289+
with self.assertRaises(ValueError):
12901290
_ = r1.angdist(p1a)
12911291

12921292
# in general, the _op2 interface allows same type only
1293-
with self.assertRaises(TypeError):
1293+
with self.assertRaises(ValueError):
12941294
_ = r1._op2(right=p1a, op=r1.angdist)
12951295

1296-
with self.assertRaises(TypeError):
1296+
with self.assertRaises(ValueError):
12971297
_ = p1a._op2(right=r1, op=p1a.angdist)
12981298

12991299
def test_functions(self):

0 commit comments

Comments
 (0)
0