Revise documents
@@ -59,17 +59,20 @@ def scatter_add(a, slices, value):
def scatter_max(a, slices, value):
"""Stores a maximum value of elements specified by indices to an array.
- It stores a maximum value of elements of ``value`` specified by ``slices``
+ It stores the maximum value of elements in ``value`` array indexed by ``slices``
to ``a``. If all of the indices target different locations, the operation
of :func:`scatter_max` is equivalent to
``a[slices] = cupy.maximum(a[slices], value)``.
If there are multiple elements targeting the same location,
:func:`scatter_max` stores the maximum of all of these values to the given
- index of the array.
+ index of ``a``, the initial element of ``a`` is also taken in account.
Note that just like an array indexing, negative indices are interpreted as
counting from the end of an array.
+ Also note that :func:`scatter_max` behaves identically
+ to :func:`numpy.maximum.at`.
+
Example
-------
>>> import numpy
@@ -96,17 +99,20 @@ def scatter_max(a, slices, value):
def scatter_min(a, slices, value):
"""Stores a minimum value of elements specified by indices to an array.
- It stores a minimum value of elements of ``value`` specified by ``slices``
+ It stores the minimum value of elements in ``value`` array indexed by ``slices``
to ``a``. If all of the indices target different locations, the operation
of :func:`scatter_min` is equivalent to
``a[slices] = cupy.minimum(a[slices], value)``.
If there are multiple elements targeting the same location,
:func:`scatter_min` stores the minimum of all of these values to the given
- index of the array.
+ index of ``a``, the initial element of ``a`` is also taken in account.
Note that just like an array indexing, negative indices are interpreted as
counting from the end of an array.
+ Also note that :func:`scatter_min` behaves identically
+ to :func:`numpy.minimum.at`.
+
Example
-------
>>> import numpy
