summaryrefslogtreecommitdiff
path: root/doc/source/reference/internals.code-explanations.rst
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2017-11-08 22:49:19 +0200
committerNathaniel J. Smith <njs@pobox.com>2017-11-08 14:49:19 -0600
commit1368cbb696ae27b849eed67b4fd31c550a55dad5 (patch)
tree7fe99f6c4483d5a1bd6e3883279b2b38fcd85970 /doc/source/reference/internals.code-explanations.rst
parentc276f326b29bcb7c851169d34f4767da0b4347af (diff)
downloadnumpy-1368cbb696ae27b849eed67b4fd31c550a55dad5.tar.gz
DEP, ENH: deprecate UPDATEIFCOPY (except for nditer) and replace with WRITEBACKIFCOPY (#9639)
* ENH: add API to resolve UPDATEONCOPY outside dealloc, test and use * BUG: Fix usage of keyword "from" as argument name for "can_cast". Also removed inconsistency between the second argument name between documentation ("totype") and code ("to"). * UPDATEIFCOPY -> WRITEBACKIFCOPY, documentation * fixes for review * review2, fix new test * fix new test for using self.assert_deprecated * change deprecation logic as per review * new logic exposed places where PyArray_ResolveWritebackIfCopy not called * deprecate PyArray_XDECREF_ERR in favor of PyArray_DiscardWritebackIfCopy * code review changes * clean up merge cruft * fix from review * fixes from review * extend the release note
Diffstat (limited to 'doc/source/reference/internals.code-explanations.rst')
-rw-r--r--doc/source/reference/internals.code-explanations.rst12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/source/reference/internals.code-explanations.rst b/doc/source/reference/internals.code-explanations.rst
index 94e827429..ca81e1676 100644
--- a/doc/source/reference/internals.code-explanations.rst
+++ b/doc/source/reference/internals.code-explanations.rst
@@ -368,8 +368,9 @@ The output arguments (if any) are then processed and any missing
return arrays are constructed. If any provided output array doesn't
have the correct type (or is mis-aligned) and is smaller than the
buffer size, then a new output array is constructed with the special
-UPDATEIFCOPY flag set so that when it is DECREF'd on completion of the
-function, its contents will be copied back into the output array.
+:c:data:`WRITEBACKIFCOPY` flag set. At the end of the function,
+:c:func:`PyArray_ResolveWritebackIfCopy` is called so that
+its contents will be copied back into the output array.
Iterators for the output arguments are then processed.
Finally, the decision is made about how to execute the looping
@@ -508,10 +509,11 @@ of a different shape depending on whether the method is reduce,
accumulate, or reduceat. If an output array is already provided, then
it's shape is checked. If the output array is not C-contiguous,
aligned, and of the correct data type, then a temporary copy is made
-with the UPDATEIFCOPY flag set. In this way, the methods will be able
+with the WRITEBACKIFCOPY flag set. In this way, the methods will be able
to work with a well-behaved output array but the result will be copied
-back into the true output array when the method computation is
-complete. Finally, iterators are set up to loop over the correct axis
+back into the true output array when :c:func:`PyArray_ResolveWritebackIfCopy`
+is called at function completion.
+Finally, iterators are set up to loop over the correct axis
(depending on the value of axis provided to the method) and the setup
routine returns to the actual computation routine.