提交 f0c64a36 authored 作者: james@X40's avatar james@X40

corrected use of NotImplemented

上级 af5445ed
...@@ -494,32 +494,32 @@ class _tensor_py_operators: ...@@ -494,32 +494,32 @@ class _tensor_py_operators:
try: try:
return add(self,other) return add(self,other)
except Exception, e: except Exception, e:
raise NotImplemented return NotImplemented
def __sub__(self,other): def __sub__(self,other):
try: try:
return sub(self,other) return sub(self,other)
except Exception, e: except Exception, e:
raise NotImplemented return NotImplemented
def __mul__(self,other): def __mul__(self,other):
try: try:
return mul(self,other) return mul(self,other)
except Exception, e: except Exception, e:
raise NotImplemented return NotImplemented
def __div__(self,other): def __div__(self,other):
try: try:
return div(self,other) return div(self,other)
except Exception, e: except Exception, e:
raise NotImplemented return NotImplemented
def __pow__(self,other): def __pow__(self,other):
try: try:
return pow(self,other) return pow(self,other)
except Exception, e: except Exception, e:
raise NotImplemented return NotImplemented
def __mod__(self,other): def __mod__(self,other):
try: try:
return mod(self,other) return mod(self,other)
except Exception, e: except Exception, e:
raise NotImplemented return NotImplemented
# ##### DON"T USE THESE BECAUSE INPLACE OPS SHOULD BE INSERTED BY OPTIMIZATION ONLY # ##### DON"T USE THESE BECAUSE INPLACE OPS SHOULD BE INSERTED BY OPTIMIZATION ONLY
# #ARITHMETIC - INPLACE # #ARITHMETIC - INPLACE
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论