提交 d6f57f2b authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #1562 from nouiz/err_msg

Don't override the NumPy error message.
......@@ -49,6 +49,7 @@ class CURAND_Base(GpuOp):
if self.destructive:
self.destroy_map = {0: [0]}
self.output_type = output_type
assert output_type.dtype == "float32"
def as_destructive(self):
"""Return an destructive version of self"""
......
......@@ -3887,8 +3887,7 @@ class Reshape(Op):
PyArray_CORDER);
if (!%(z)s)
{
PyErr_Format(PyExc_ValueError,
"Could not reshape array.");
//The error message should have been set by PyArray_Newshape
%(fail)s;
}
if (!PyArray_ISALIGNED(%(z)s)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论