Skip to content

Commit 7297788

Browse files
committed
Remove assertion from equality check
1 parent 13d6ee1 commit 7297788

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spatialmath/baseposematrix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,8 +1531,8 @@ def __eq__(left, right): # lgtm[py/not-named-self] pylint: disable=no-self-argu
15311531
========= ========== ==== ================================
15321532
15331533
"""
1534-
assert type(left) == type(right), "operands to == are of different types"
1535-
return left._op2(right, lambda x, y: np.allclose(x, y))
1534+
return (left._op2(right, lambda x, y: np.allclose(x, y))
1535+
if type(left) == type(right) else False)
15361536

15371537
def __ne__(left, right): # lgtm[py/not-named-self] pylint: disable=no-self-argument
15381538
"""

0 commit comments

Comments
 (0)