提交 a4f4cf58 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix execption problem with Alloc().

上级 633fd89c
...@@ -2780,13 +2780,14 @@ class Alloc(gof.Op): ...@@ -2780,13 +2780,14 @@ class Alloc(gof.Op):
} }
// This function takes care of broadcasting // This function takes care of broadcasting
PyArray_CopyInto(%(zz)s, %(vv)s); if (PyArray_CopyInto(%(zz)s, %(vv)s) == -1)
%(fail)s
""" % dict(vv=vv, ndim=ndim, zz=zz, fail=fail) """ % dict(vv=vv, ndim=ndim, zz=zz, fail=fail)
return code return code
def c_code_cache_version(self): def c_code_cache_version(self):
return (1,) return (2,)
def infer_shape(self, node, input_shapes): def infer_shape(self, node, input_shapes):
return [node.inputs[1:]] return [node.inputs[1:]]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论