summaryrefslogtreecommitdiff
path: root/numpy/doc/dispatch.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/doc/dispatch.py')
-rw-r--r--numpy/doc/dispatch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/doc/dispatch.py b/numpy/doc/dispatch.py
index 15e9fff6a..c9029941b 100644
--- a/numpy/doc/dispatch.py
+++ b/numpy/doc/dispatch.py
@@ -72,7 +72,7 @@ The ``__array_ufunc__`` receives:
- ``inputs``, which could be a mixture of different types
- ``kwargs``, keyword arguments passed to the function
-For this example we will only handle the method ``'__call__``.
+For this example we will only handle the method ``__call__``.
>>> from numbers import Number
>>> class DiagonalArray:
@@ -218,7 +218,7 @@ 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):
+... def sum(arr):
... "Implementation of np.sum for DiagonalArray objects"
... return arr._i * arr._N
...