Skip to content

Commit 13d6ee1

Browse files
committed
Make __ne__ operator handle singular values
1 parent 007864e commit 13d6ee1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spatialmath/baseposematrix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,8 @@ def __ne__(left, right): # lgtm[py/not-named-self] pylint: disable=no-self-argu
15591559
========= ========== ==== ================================
15601560
15611561
"""
1562-
return [not x for x in left == right]
1562+
eq = left == right
1563+
return (not eq if isinstance(eq, bool) else [not x for x in eq])
15631564

15641565
def _op2(
15651566
left, right, op

0 commit comments

Comments
 (0)