diff options
author | Francesc Alted <faltet@pytables.org> | 2012-05-04 00:00:54 -0500 |
---|---|---|
committer | Francesc Alted <faltet@pytables.org> | 2012-05-04 00:00:54 -0500 |
commit | d7d6b6c8d067c5af02ca57f0646df77233021ea3 (patch) | |
tree | 3df0f03d5893acb59dbb401ebe3a7cafcdcb4e2c /doc/source/reference/c-api.array.rst | |
parent | 259fff8f08dabd8198d2ec0f5abe99a05a5477d5 (diff) | |
download | numpy-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.rst | 4 |
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*. |