summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-12-18 11:44:06 -0700
committerCharles Harris <charlesr.harris@gmail.com>2015-12-18 11:44:06 -0700
commit25a54d59451c2dc2861cb4d254e0a1cc5a5f1192 (patch)
tree766f0e48ec60ff158b5ff14685f920c7110dd2d8 /doc/source
parent3af5f0574740611076df9dc905330defab70a6dc (diff)
parentc5d8f5c9261a887349f46f4a12047a2d0b99d083 (diff)
downloadnumpy-25a54d59451c2dc2861cb4d254e0a1cc5a5f1192.tar.gz
Merge pull request #6600 from mgeier/doc-ndarray-subclasses
DOC: fix method signatures in "array subclasses"
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/reference/arrays.classes.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/source/reference/arrays.classes.rst b/doc/source/reference/arrays.classes.rst
index 5716f4562..b82f7d33c 100644
--- a/doc/source/reference/arrays.classes.rst
+++ b/doc/source/reference/arrays.classes.rst
@@ -39,9 +39,9 @@ Special attributes and methods
Numpy provides several hooks that classes can customize:
-.. function:: class.__numpy_ufunc__(self, ufunc, method, i, inputs, **kwargs)
+.. method:: class.__numpy_ufunc__(ufunc, method, i, inputs, **kwargs)
- .. versionadded:: 1.10
+ .. versionadded:: 1.11
Any class (ndarray subclass or not) can define this method to
override behavior of Numpy's ufuncs. This works quite similarly to
@@ -109,7 +109,7 @@ Numpy provides several hooks that classes can customize:
your_obj)`` always calls only your ``__numpy_ufunc__``, as
expected.
-.. function:: class.__array_finalize__(self)
+.. method:: class.__array_finalize__(obj)
This method is called whenever the system internally allocates a
new array from *obj*, where *obj* is a subclass (subtype) of the
@@ -118,7 +118,7 @@ Numpy provides several hooks that classes can customize:
to update meta-information from the "parent." Subclasses inherit
a default implementation of this method that does nothing.
-.. function:: class.__array_prepare__(array, context=None)
+.. method:: class.__array_prepare__(array, context=None)
At the beginning of every :ref:`ufunc <ufuncs.output-type>`, this
method is called on the input object with the highest array
@@ -130,7 +130,7 @@ Numpy provides several hooks that classes can customize:
the subclass and update metadata before returning the array to the
ufunc for computation.
-.. function:: class.__array_wrap__(array, context=None)
+.. method:: class.__array_wrap__(array, context=None)
At the end of every :ref:`ufunc <ufuncs.output-type>`, this method
is called on the input object with the highest array priority, or
@@ -149,7 +149,7 @@ Numpy provides several hooks that classes can customize:
possibility for the Python type of the returned object. Subclasses
inherit a default value of 0.0 for this attribute.
-.. function:: class.__array__([dtype])
+.. method:: class.__array__([dtype])
If a class (ndarray subclass or not) having the :func:`__array__`
method is used as the output object of an :ref:`ufunc