Skip to content

Commit

Permalink
clean up lifted operations, add pow operation (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
lostella authored Jan 29, 2020
1 parent 611a1fd commit 2f10256
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/gluonts/dataset/artificial/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,19 @@ def __rsub__(self, other):
return LiftedSub(other, self)

def __mul__(self, other):
return LiftedMul(self, other, operator.mul)
return LiftedMul(self, other)

def __rmul__(self, other):
return LiftedMul(other, self, operator.mul)
return LiftedMul(other, self)

def __truediv__(self, other):
return LiftedTruediv(self, other, operator.truediv)
return LiftedTruediv(self, other)

def __rtruediv__(self, other):
return LiftedTruediv(other, self, operator.truediv)
return LiftedTruediv(other, self)

def __pow__(self, other):
return LiftedBinaryOp(self, other, operator.pow)

def __call__(
self,
Expand Down

0 comments on commit 2f10256

Please sign in to comment.