提交 5e3d6902 authored 作者: Olivier Breuleux's avatar Olivier Breuleux

fixed error message when ufunc fails

上级 0786f2af
......@@ -521,10 +521,11 @@ class Elemwise(Op):
try:
results = ufunc(*ufunc_args)
except:
except Exception, e:
errormsg = 'Failed calling ufunc for op', self.scalar_op,\
'for params of shape', [arg.shape for arg in ufunc_args]
raise Exception, errormsg
e.args = e.args + errormsg
raise e
if ufunc.nout == 1: results = [results]
for result, storage in zip(results, output_storage):
if storage[0].shape:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论