diff options
author | Matt McCormick <matt.mccormick@kitware.com> | 2019-08-14 09:32:12 -0400 |
---|---|---|
committer | Matt McCormick <matt.mccormick@kitware.com> | 2019-08-14 09:32:12 -0400 |
commit | ad91f48f729c6bc67a7dc31428ce725d6fe789e6 (patch) | |
tree | 7c94406347bcec392b7f0a183d6bea34f2aa6ae4 /numpy/doc/dispatch.py | |
parent | 83e5ec779592f843823c3aa1f8e90abfcfdd6a02 (diff) | |
download | numpy-ad91f48f729c6bc67a7dc31428ce725d6fe789e6.tar.gz |
DOC: Address typos in dispatch docs
Diffstat (limited to 'numpy/doc/dispatch.py')
-rw-r--r-- | numpy/doc/dispatch.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/doc/dispatch.py b/numpy/doc/dispatch.py index 09a3e5134..8db607131 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,12 +218,12 @@ 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 ... >>> @implements(np.mean) -... def sum(a): +... def sum(arr): ... "Implementation of np.mean for DiagonalArray objects" ... return arr._i / arr._N ... |