提交 57c025ae authored 作者: Frederic Bastien's avatar Frederic Bastien

fix a bug when empty ndarray in python code. This don't affect normal behavior.

上级 e5657f9a
......@@ -626,6 +626,8 @@ class Elemwise(Op):
raise
if ufunc.nout == 1: variables = [variables]
for variable, storage in zip(variables, output_storage):
if hasattr(variable,'shape') and storage[0].shape != variable.shape:
storage[0].resize(variable.shape)
if storage[0].shape:
storage[0][:] = variable
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论