提交 1b547eca authored 作者: jhelie's avatar jhelie

fix confusion between NotImplemented and NotImplementedError

上级 f6aa74b2
...@@ -1333,7 +1333,7 @@ class GetItemScalar(gof.op.Op): ...@@ -1333,7 +1333,7 @@ class GetItemScalar(gof.op.Op):
elif ind.ndim == 0: elif ind.ndim == 0:
input_op += [ind] input_op += [ind]
else: else:
raise NotImplemented() raise NotImplementedError
return gof.Apply(self, input_op, [tensor.scalar(dtype=x.dtype)]) return gof.Apply(self, input_op, [tensor.scalar(dtype=x.dtype)])
......
...@@ -1350,7 +1350,7 @@ def local_mul_s_d(node): ...@@ -1350,7 +1350,7 @@ def local_mul_s_d(node):
CSx = sparse.CSR CSx = sparse.CSR
mul_s_d_csx = mul_s_d_csr mul_s_d_csx = mul_s_d_csr
else: else:
raise NotImplemented() raise NotImplementedError
if x.dtype != y.dtype: if x.dtype != y.dtype:
# mul_s_d_csx don't support that case # mul_s_d_csx don't support that case
return return
......
...@@ -194,7 +194,7 @@ class Multinomial(gof.op.Op): ...@@ -194,7 +194,7 @@ class Multinomial(gof.op.Op):
assert _is_sparse(p) assert _is_sparse(p)
if p.format != 'csr': if p.format != 'csr':
raise NotImplemented() raise NotImplementedError
out[0] = p.copy() out[0] = p.copy()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论