提交 063d3df2 authored 作者: Frederic's avatar Frederic

Correctly check the NPY_VERSION in the c code.

上级 1c3335e9
...@@ -334,7 +334,7 @@ class DimShuffle(Op): ...@@ -334,7 +334,7 @@ class DimShuffle(Op):
'PyArray_UpdateFlags(%(res)s, NPY_ARRAY_UPDATE_ALL)', 'PyArray_UpdateFlags(%(res)s, NPY_ARRAY_UPDATE_ALL)',
#we are making a view in both inplace and non-inplace cases #we are making a view in both inplace and non-inplace cases
""" """
#if NPY_VERSION < 0x01000009 #if NPY_VERSION <= 0x01000009
PyArray_BASE(%(res)s) = (PyObject*)%(basename)s; PyArray_BASE(%(res)s) = (PyObject*)%(basename)s;
#else #else
PyArray_SetBaseObject(%(res)s, (PyObject*)%(basename)s); PyArray_SetBaseObject(%(res)s, (PyObject*)%(basename)s);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论