Permalink
Browse files

DOC: Update ufunc documentation (#9141)

* DOC: Update ufuncs.rst to mention the option of an axis tuple

fixes issue gh-9131.
ufuncs.rst now mentions that the axis may be assigned a tuple of int for reduce.
Also fixed broken "{op}.reduce" link on the webpage in the same article.
  • Loading branch information...
shitian-ni authored and mhvk committed May 19, 2017
1 parent 1ec9ad6 commit d090484f8ec0daae720e79169e1a853f84e6deb4
Showing with 5 additions and 3 deletions.
  1. +5 −3 doc/source/reference/ufuncs.rst
@@ -429,9 +429,11 @@ Attempting to call these methods on other ufuncs will cause a
:exc:`ValueError`. The reduce-like methods all take an *axis* keyword, a *dtype*
keyword, and an *out* keyword, and the arrays must all have dimension >= 1.
The *axis* keyword specifies the axis of the array over which the reduction
will take place and may be negative, but must be an integer. The
*dtype* keyword allows you to manage a very common problem that arises
when naively using :ref:`{op}.reduce <ufunc.reduce>`. Sometimes you may
will take place (with negative values counting backwards). Generally, it is an
integer, though for :meth:`ufunc.reduce`, it can also be a tuple of `int` to
reduce over several axes at once, or `None`, to reduce over all axes.
The *dtype* keyword allows you to manage a very common problem that arises
when naively using :meth:`ufunc.reduce`. Sometimes you may
have an array of a certain data type and wish to add up all of its
elements, but the result does not fit into the data type of the
array. This commonly happens if you have an array of single-byte

0 comments on commit d090484

Please sign in to comment.