@@ -1079,16 +1079,21 @@ def __mul__(left, right): # lgtm[py/not-named-self] pylint: disable=no-self-arg
1079
1079
1080
1080
elif isinstance (right , (list , tuple , np .ndarray )):
1081
1081
#print('*: pose x array')
1082
- if len (left ) == 1 and base .isvector (right , left .N ):
1083
- # pose x vector
1084
- #print('*: pose x vector')
1085
- v = base .getvector (right , out = 'col' )
1086
- if left .isSE :
1087
- # SE(n) x vector
1088
- return base .h2e (left .A @ base .e2h (v ))
1082
+ if len (left ) == 1 :
1083
+ if base .isvector (right , left .N ):
1084
+ # pose x vector
1085
+ #print('*: pose x vector')
1086
+ v = base .getvector (right , out = 'col' )
1087
+ if left .isSE :
1088
+ # SE(n) x vector
1089
+ return base .h2e (left .A @ base .e2h (v ))
1090
+ else :
1091
+ # SO(n) x vector
1092
+ return left .A @ v
1089
1093
else :
1090
- # SO(n) x vector
1091
- return left .A @ v
1094
+ if right .shape == left .A .shape :
1095
+ # SE(n) x (nxn)
1096
+ return left .A @ right
1092
1097
1093
1098
elif len (left ) > 1 and base .isvector (right , left .N ):
1094
1099
# pose array x vector
@@ -1165,10 +1170,11 @@ def __rmul__(right, left): # lgtm[py/not-named-self] pylint: disable=no-self-ar
1165
1170
1166
1171
:seealso: :func:`__mul__`
1167
1172
"""
1168
- if base .isscalar (left ):
1169
- return right .__mul__ (left )
1170
- else :
1171
- return NotImplemented
1173
+ # if base.isscalar(left):
1174
+ # return right.__mul__(left)
1175
+ # else:
1176
+ # return NotImplemented
1177
+ return right .__mul__ (left )
1172
1178
1173
1179
def __imul__ (left , right ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
1174
1180
"""
0 commit comments