提交 8f78ce7b authored 作者: Frederic Bastien's avatar Frederic Bastien

Clean up as we don't support numpy 1.7 now.

上级 dc458e24
...@@ -340,11 +340,7 @@ class DimShuffle(Op): ...@@ -340,11 +340,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_API_VERSION < 0x00000007
PyArray_BASE(%(res)s) = (PyObject*)%(basename)s;
#else
PyArray_SetBaseObject(%(res)s, (PyObject*)%(basename)s); PyArray_SetBaseObject(%(res)s, (PyObject*)%(basename)s);
#endif
""" """
'}'] '}']
......
...@@ -930,11 +930,7 @@ class Subtensor(Op): ...@@ -930,11 +930,7 @@ class Subtensor(Op):
finish_view = """ finish_view = """
Py_XDECREF(%(z)s); Py_XDECREF(%(z)s);
Py_INCREF(py_%(x)s); Py_INCREF(py_%(x)s);
#if NPY_API_VERSION < 0x00000007
PyArray_BASE(xview) = py_%(x)s;
#else
PyArray_SetBaseObject(xview, py_%(x)s); PyArray_SetBaseObject(xview, py_%(x)s);
#endif
assert(py_%(x)s == (PyObject*)%(x)s); assert(py_%(x)s == (PyObject*)%(x)s);
%(z)s = xview; %(z)s = xview;
""" % locals() """ % locals()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论