Skip to content

Commit 0225524

Browse files
committed
fix broadcasting bug for scalar/vector case
1 parent da9e422 commit 0225524

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spatialmath/base/vectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ def angdiff(a, b=None):
645645
a = getvector(a)
646646
if b is not None:
647647
b = getvector(b)
648-
a -= b
648+
a = a - b # cannot use -= here, numpy wont broadcast
649649

650650
return np.mod(a + math.pi, 2 * math.pi) - math.pi
651651

0 commit comments

Comments
 (0)