Skip to content

Commit

Permalink
fix python
Browse files Browse the repository at this point in the history
  • Loading branch information
yajiedesign committed Nov 11, 2015
1 parent f1ac7cd commit 7ab8c33
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/mxnet/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __add__(self, other):
if isinstance(other, Symbol):
return Symbol._Plus(self, other)
if isinstance(other, Number):
return Symbol._PlusScalar(self, value=other)
return Symbol._PlusScalar(self, scalar=other)
else:
raise TypeError('type %s not supported' % str(type(other)))

Expand All @@ -45,21 +45,21 @@ def __sub__(self, other):
if isinstance(other, Symbol):
return Symbol._Minus(self, other)
if isinstance(other, Number):
return Symbol._MinusScalar(self, value=other)
return Symbol._MinusScalar(self, scalar=other)
else:
raise TypeError('type %s not supported' % str(type(other)))

def __rsub__(self, other):
if isinstance(other, Number):
return Symbol._MinusScalar(self, value=other, right=True)
return Symbol._MinusScalar(self, scalar=other, scalar_on_right=True)
else:
raise TypeError('type %s not supported' % str(type(other)))

def __mul__(self, other):
if isinstance(other, Symbol):
return Symbol._Mul(self, other)
if isinstance(other, Number):
return Symbol._MulScalar(self, value=other)
return Symbol._MulScalar(self, scalar=other)
else:
raise TypeError('type %s not supported' % str(type(other)))

Expand All @@ -70,13 +70,13 @@ def __div__(self, other):
if isinstance(other, Symbol):
return Symbol._Div(self, other)
if isinstance(other, Number):
return Symbol._DivScalar(self, value=other)
return Symbol._DivScalar(self, scalar=other)
else:
raise TypeError('type %s not supported' % str(type(other)))

def __rdiv__(self, other):
if isinstance(other, Number):
return Symbol._DivScalar(self, value=other, right=True)
return Symbol._DivScalar(self, scalar=other, scalar_on_right=True)
else:
raise TypeError('type %s not supported' % str(type(other)))

Expand Down

0 comments on commit 7ab8c33

Please sign in to comment.