提交 e921dc7e authored 作者: Frederic's avatar Frederic

use current numpy c api

上级 3fb06c11
...@@ -919,9 +919,9 @@ class Fibby(theano.Op): ...@@ -919,9 +919,9 @@ class Fibby(theano.Op):
if (!%(y)s) if (!%(y)s)
%(fail)s; %(fail)s;
{//New scope needed to make compilation work {//New scope needed to make compilation work
dtype_%(y)s * y = (dtype_%(y)s*)%(y)s->data; dtype_%(y)s * y = (dtype_%(y)s*)PyArray_DATA(%(y)s);
dtype_%(x)s * x = (dtype_%(x)s*)%(x)s->data; dtype_%(x)s * x = (dtype_%(x)s*)PyArray_DATA(%(x)s);
for (int i = 2; i < %(x)s->dimensions[0]; ++i) for (int i = 2; i < PyArray_DIMS(%(x)s)[0]; ++i)
y[i] = y[i-1]*y[i-2] + x[i]; y[i] = y[i-1]*y[i-2] + x[i];
} }
""" % locals() """ % locals()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论