提交 36e6649e authored 作者: Josh Bleecher Snyder's avatar Josh Bleecher Snyder

provide more detail in error message

上级 a9cb097c
...@@ -630,7 +630,7 @@ PyObject * CudaNdarray_Reshape(CudaNdarray * self, PyObject * shape) ...@@ -630,7 +630,7 @@ PyObject * CudaNdarray_Reshape(CudaNdarray * self, PyObject * shape)
// calculate new size, assert same as old size // calculate new size, assert same as old size
if (rval_size != CudaNdarray_SIZE(self)) if (rval_size != CudaNdarray_SIZE(self))
{ {
PyErr_SetString(PyExc_ValueError, "size must remain unchanged"); PyErr_Format(PyExc_ValueError, "size must remain unchanged, changed from %i to %i", CudaNdarray_SIZE(self), rval_size);
free(rval_dims); free(rval_dims);
return NULL; return NULL;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论