summaryrefslogtreecommitdiff
path: root/numpy/doc
diff options
context:
space:
mode:
authorDan Allan <dallan@bnl.gov>2019-07-14 10:03:40 -0500
committerCharles Harris <charlesr.harris@gmail.com>2019-07-14 15:36:18 -0600
commitfc97dc979d80eb39e656ec188f880aee88d4f001 (patch)
tree2e0ab036f2e5576d69984988be2f99bc789d4133 /numpy/doc
parent721a3ce46198fcd00e7d785025c9823ae8e3bbc2 (diff)
downloadnumpy-fc97dc979d80eb39e656ec188f880aee88d4f001.tar.gz
Copy editing
Diffstat (limited to 'numpy/doc')
-rw-r--r--numpy/doc/dispatch.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/doc/dispatch.py b/numpy/doc/dispatch.py
index f592d4ffd..313167005 100644
--- a/numpy/doc/dispatch.py
+++ b/numpy/doc/dispatch.py
@@ -214,6 +214,8 @@ to add functions to ``HANDLED_FUNCTIONS``.
...
Now we write implementations of numpy functions for ``DiagonalArray``.
+For completeness, to support the usage ``arr.sum()`` add a method ``sum`` that
+calls ``numpy.sum(self)``, and the same for ``mean``.
>>> @implements(np.sum)
... def sum(a, axis=None, out=None):
@@ -233,9 +235,6 @@ Now we write implementations of numpy functions for ``DiagonalArray``.
>>> np.mean(arr)
0.2
-For completeness, to support the usage ``arr.sum()`` add a method ``sum`` that
-calls ``numpy.sum(self)``, and the same for ``mean``.
-
If the user tries to use any numpy functions not included in
``HANDLED_FUNCTIONS``, a ``TypeError`` will be raised by numpy, indicating that
this operation is not supported. For example, concatenating two