summaryrefslogtreecommitdiff
path: root/doc/source/reference/c-api.array.rst
diff options
context:
space:
mode:
authorFrancesc Alted <faltet@pytables.org>2012-05-04 00:00:54 -0500
committerFrancesc Alted <faltet@pytables.org>2012-05-04 00:00:54 -0500
commitd7d6b6c8d067c5af02ca57f0646df77233021ea3 (patch)
tree3df0f03d5893acb59dbb401ebe3a7cafcdcb4e2c /doc/source/reference/c-api.array.rst
parent259fff8f08dabd8198d2ec0f5abe99a05a5477d5 (diff)
downloadnumpy-d7d6b6c8d067c5af02ca57f0646df77233021ea3.tar.gz
Stress that all array creation C functions steals a reference to descr.
Diffstat (limited to 'doc/source/reference/c-api.array.rst')
-rw-r--r--doc/source/reference/c-api.array.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst
index 89981a977..8eedc689a 100644
--- a/doc/source/reference/c-api.array.rst
+++ b/doc/source/reference/c-api.array.rst
@@ -224,6 +224,8 @@ From scratch
.. cfunction:: PyObject* PyArray_NewFromDescr(PyTypeObject* subtype, PyArray_Descr* descr, int nd, npy_intp* dims, npy_intp* strides, void* data, int flags, PyObject* obj)
+ This function steals a reference to *descr* if it is not NULL.
+
This is the main array creation function. Most new arrays are
created with this flexible function.
@@ -322,6 +324,8 @@ From scratch
.. cfunction:: PyObject* PyArray_SimpleNewFromDescr(int nd, npy_intp* dims, PyArray_Descr* descr)
+ This function steals a reference to *descr* if it is not NULL.
+
Create a new array with the provided data-type descriptor, *descr*
, of the shape deteremined by *nd* and *dims*.