提交 cd1293ca authored 作者: Melanie Ducoffe's avatar Melanie Ducoffe

class AllocEmpty

上级 9d451659
...@@ -5520,8 +5520,8 @@ class AllocEmpty(gof.Op): ...@@ -5520,8 +5520,8 @@ class AllocEmpty(gof.Op):
nd = len(shps) nd = len(shps)
str = "int dims[%(nd)s];\n" % locals() str = "int dims[%(nd)s];\n" % locals()
for idx, sh in enumerate(shps): for idx, sh in enumerate(shps):
str += "dims[%(idx)s] =" + str += "dims[%(idx)s] =" +
"PyInt_AsLong((PyObject*)%(sh)s);\n" % locals() "PyInt_AsLong((PyObject*)%(sh)s);\n" % locals()
# Validate that the output storage exists # Validate that the output storage exists
str += "if(%(out)s==NULL\n" % locals() str += "if(%(out)s==NULL\n" % locals()
for idx, sh in enumerate(shps): for idx, sh in enumerate(shps):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论