summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
authorJay Bourque <jay.bourque@continuum.io>2012-12-19 14:12:21 -0600
committerJay Bourque <jay.bourque@continuum.io>2013-08-16 16:39:31 -0500
commit13c1847ba2f0eab36004491deb0e2b8e1140c133 (patch)
treeeb6e37927c5c1bb47594fe356a4b3738ecd13378 /numpy/add_newdocs.py
parent1b81be70ff832aac385254d57fb0c6feae8873bf (diff)
downloadnumpy-13c1847ba2f0eab36004491deb0e2b8e1140c133.tar.gz
Reword some comments/documentation
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index adfbc5b5a..e630ae921 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -5820,11 +5820,14 @@ add_newdoc('numpy.core', 'ufunc', ('at',
at(a, indices, b=None)
Performs operation in place on array for items specified by indices.
- Items can be listed more than once and operation will be performed
- on result of operation on previous item.
-
- Equivalent to a[indices] += b for addition ufunc, except that results
- are accumulated for indices listed more than once.
+ For addition ufunc, this method is equivalent to a[indices] += b,
+ except that results are accumulated for indices listed more than once.
+ This solves the problem with a[indices] += b where each time a duplicate
+ index is encounted, the increment is performed on the original element.
+ As a result, an element that appears three times in the fancy indexing
+ list will only be incremented once in the final result, whereas with the
+ new 'at' method the original element will be incremented by three in the
+ final result.
Parameters
----------