diff options
author | mattip <matti.picus@gmail.com> | 2019-01-21 23:42:56 +0200 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-01-21 23:42:56 +0200 |
commit | d2a6daead874762f992532106502c448a9d43758 (patch) | |
tree | bf103119227626d08321e058ef8280fdb021dfeb /doc/source/reference/arrays.ndarray.rst | |
parent | 3cbc11ac56054ad3ac7461e57433aefe37f2e3e4 (diff) | |
download | numpy-d2a6daead874762f992532106502c448a9d43758.tar.gz |
DOC: remove python2-only methods, small cleanups
Diffstat (limited to 'doc/source/reference/arrays.ndarray.rst')
-rw-r--r-- | doc/source/reference/arrays.ndarray.rst | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/doc/source/reference/arrays.ndarray.rst b/doc/source/reference/arrays.ndarray.rst index 306d22f43..9e921bbf5 100644 --- a/doc/source/reference/arrays.ndarray.rst +++ b/doc/source/reference/arrays.ndarray.rst @@ -461,12 +461,12 @@ Truth value of an array (:func:`bool()`): .. autosummary:: :toctree: generated/ - ndarray.__nonzero__ + ndarray.__bool__ .. note:: Truth-value testing of an array invokes - :meth:`ndarray.__nonzero__`, which raises an error if the number of + :meth:`ndarray.__bool__`, which raises an error if the number of elements in the array is larger than 1, because the truth value of such arrays is ambiguous. Use :meth:`.any() <ndarray.any>` and :meth:`.all() <ndarray.all>` instead to be clear about what is meant @@ -492,7 +492,6 @@ Arithmetic: ndarray.__add__ ndarray.__sub__ ndarray.__mul__ - ndarray.__div__ ndarray.__truediv__ ndarray.__floordiv__ ndarray.__mod__ @@ -527,7 +526,6 @@ Arithmetic, in-place: ndarray.__iadd__ ndarray.__isub__ ndarray.__imul__ - ndarray.__idiv__ ndarray.__itruediv__ ndarray.__ifloordiv__ ndarray.__imod__ @@ -597,19 +595,17 @@ Container customization: (see :ref:`Indexing <arrays.indexing>`) ndarray.__setitem__ ndarray.__contains__ -Conversion; the operations :func:`complex()`, :func:`int()`, -:func:`long()`, :func:`float()`, :func:`oct()`, and -:func:`hex()`. They work only on arrays that have one element in them +Conversion; the operations :func:`complex()`, :func:`int()` and +:func:`float()`. +. They work only on arrays that have one element in them and return the appropriate scalar. .. autosummary:: :toctree: generated/ ndarray.__int__ - ndarray.__long__ ndarray.__float__ - ndarray.__oct__ - ndarray.__hex__ + ndarray.__complex__ String representations: |