File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,6 +280,12 @@ def __ne__(left, right): # lgtm[py/not-named-self] pylint: disable=no-self-argu
280280 raise TypeError ('operands to != are of different types' )
281281 return left .binop (right , lambda x , y : not all (x == y ), list1 = False )
282282
283+ def __truediv__ (left , right ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
284+ if base .isscalar (right ):
285+ return Twist3 (left .S / right )
286+ else :
287+ raise ValueError ('Twist /, incorrect right operand' )
288+
283289# ======================================================================== #
284290
285291
@@ -1062,7 +1068,7 @@ def __rmul__(right, left): # lgtm[py/not-named-self] pylint: disable=no-self-ar
10621068 - ``s * X`` performs elementwise multiplication of the elements of ``X`` by ``s``
10631069 """
10641070 if base .isscalar (left ):
1065- return Twist3 (self .S * left )
1071+ return Twist3 (right .S * left )
10661072 else :
10671073 raise ValueError ('Twist3 *, incorrect left operand' )
10681074
You can’t perform that action at this time.
0 commit comments