summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMark <mwwiebe@gmail.com>2012-05-18 14:00:03 -0700
committerMark <mwwiebe@gmail.com>2012-05-18 14:00:03 -0700
commit5c96ec6b92605f67b7c7dd7d7af986c57e7c2a6b (patch)
tree9b22ad9419478a3139904bcb4ba582309504cd2c /doc
parent6594f47b0119950fbf5f247601a26e8bb9516d92 (diff)
parentd7d6b6c8d067c5af02ca57f0646df77233021ea3 (diff)
downloadnumpy-5c96ec6b92605f67b7c7dd7d7af986c57e7c2a6b.tar.gz
Merge pull request #268 from FrancescAlted/master
The docs should stress that functions that create arrays actually steals a reference to dtype descriptor
Diffstat (limited to 'doc')
-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*.