提交 f02ee46b authored 作者: Frederic Bastien's avatar Frederic Bastien

Better error msg.

上级 be888ab6
...@@ -1670,7 +1670,9 @@ CudaNdarray_setitem(PyObject *o, PyObject *key, PyObject *value) ...@@ -1670,7 +1670,9 @@ CudaNdarray_setitem(PyObject *o, PyObject *key, PyObject *value)
{ {
// This case shouldn't happen, based on what I see in Subscript // This case shouldn't happen, based on what I see in Subscript
// but just in case it happens sometime in the future // but just in case it happens sometime in the future
PyErr_SetString(PyExc_RuntimeError, "__getitem__ must return a CudaNdarray that refers to the original CudaNdarray, not a copy.");
PyErr_Format(PyExc_RuntimeError, "__getitem__ must return a CudaNdarray that refers to the original CudaNdarray, not a copy. rval.base=%p o.base=%p o=%p",
(((CudaNdarray*)rval)->base), ((CudaNdarray*)o)->base, o);
Py_DECREF(rval); Py_DECREF(rval);
return -1; return -1;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论