提交 47e505f3 authored 作者: Benjamin Scellier's avatar Benjamin Scellier 提交者: Benjamin Scellier

remove C code for numpy versions 1.6.2 1.7.0 and 1.7.1

上级 c6ac3551
......@@ -4608,14 +4608,6 @@ class Reshape(Op):
except Exception:
raise ValueError('Cannot reshape input of shape %s to shape %s' %
(x.shape, shp))
if not out[0].flags.aligned:
raise RuntimeError("numpy.reshape returned a not aligned tensor."
" NumPy versions 1.6.2, 1.7.0 and 1.7.1 have"
" this problem for some input shape/new shape"
" combinations. Use another NumPy version."
" Input shape: %s, input stride: %s,"
" new_shape: %s, new_strides: %s." % (
x.shape, x.strides, shp, out[0].strides))
def connection_pattern(self, node):
return [[True], [False]]
......@@ -4721,15 +4713,6 @@ class Reshape(Op):
//The error message should have been set by PyArray_Newshape
%(fail)s;
}
if (!PyArray_ISALIGNED(%(z)s)) {
PyErr_Format(
PyExc_RuntimeError,
"PyArray_Newshape returned an object that isn't aligned!"
" NumPy versions 1.6.2, 1.7.0 and 1.7.1 have"
" this problem for some input shape/new shape"
" combinations. Use another NumPy version.");
%(fail)s;
}
""" % locals()
else:
return Op.c_code(self, node, name, inputs, outputs, sub)
......@@ -4902,15 +4885,6 @@ class Flatten(Op):
// PyArray_Newshape
%(fail)s;
}
if (!PyArray_ISALIGNED(%(out)s)) {
PyErr_Format(
PyExc_RuntimeError,
"PyArray_Newshape returned an object that isn't"
" aligned! NumPy versions 1.6.2, 1.7.0 and 1.7.1 have"
" this problem for some input shape/new shape"
" combinations. Use another NumPy version.");
%(fail)s;
}
""" % locals()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论