提交 468d8c84 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Do not decref descriptor, as PyArray_View steals the reference

上级 b0a20106
...@@ -1030,7 +1030,6 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){ ...@@ -1030,7 +1030,6 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){
PyObject * indices_float32 = NULL; PyObject * indices_float32 = NULL;
indices_float32 = PyArray_View((PyArrayObject*)indices_obj, indices_float32 = PyArray_View((PyArrayObject*)indices_obj,
float32_descr, NULL); float32_descr, NULL);
Py_DECREF(float32_descr);
if (verbose) printf("ndarray indices\n"); if (verbose) printf("ndarray indices\n");
if (!indices_float32) if (!indices_float32)
return NULL; return NULL;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论