summaryrefslogtreecommitdiff
path: root/doc/source/reference/c-api.array.rst
diff options
context:
space:
mode:
authorMark Wiebe <mwwiebe@gmail.com>2013-03-07 17:19:24 -0800
committerMark Wiebe <mwwiebe@gmail.com>2013-03-07 17:19:24 -0800
commit5a3ecafe1c7a57db473f926eb4be5a4040ec2344 (patch)
treee9be9777a6d6552e5d826b1fc071dc22da93a7c7 /doc/source/reference/c-api.array.rst
parentbbcfcf6ad3cbb1cbdc348161ee44f729d41c09d1 (diff)
downloadnumpy-5a3ecafe1c7a57db473f926eb4be5a4040ec2344.tar.gz
DOC: Add mention of PyArray_SetBaseObject stealing a reference
Diffstat (limited to 'doc/source/reference/c-api.array.rst')
-rw-r--r--doc/source/reference/c-api.array.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst
index bf8077a69..85cf3c317 100644
--- a/doc/source/reference/c-api.array.rst
+++ b/doc/source/reference/c-api.array.rst
@@ -335,10 +335,12 @@ From scratch
.. versionadded:: 1.7
+ This function **steals a reference** to ``obj`` and sets it as the
+ base property of ``arr``.
+
If you construct an array by passing in your own memory buffer as
a parameter, you need to set the array's `base` property to ensure
- the lifetime of the memory buffer is appropriate. This function
- accomplishes the task.
+ the lifetime of the memory buffer is appropriate.
The return value is 0 on success, -1 on failure.