summaryrefslogtreecommitdiff
path: root/doc/source/reference
diff options
context:
space:
mode:
authorMSeifert04 <michaelseifert04@yahoo.de>2019-07-07 14:26:15 +0200
committerMSeifert04 <michaelseifert04@yahoo.de>2019-07-07 14:26:15 +0200
commit68b8b2757c494c5f3957eb5ba5561ea04bfceeae (patch)
treedbee82fe8619008fed6521cba2b952e0e6182dc5 /doc/source/reference
parent07555c841feb03683ce01d49762fe9b7053a5626 (diff)
downloadnumpy-68b8b2757c494c5f3957eb5ba5561ea04bfceeae.tar.gz
DOC: Remove explicit .next method calls with built-in next
In some cases the documentation examples failed with an AttributeError because the next method was not there. In a few other cases it still worked but may be more future-proof and ideomatic if they used the next function instead of the next method.
Diffstat (limited to 'doc/source/reference')
-rw-r--r--doc/source/reference/arrays.classes.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/source/reference/arrays.classes.rst b/doc/source/reference/arrays.classes.rst
index 4f97b4ece..3b13530c7 100644
--- a/doc/source/reference/arrays.classes.rst
+++ b/doc/source/reference/arrays.classes.rst
@@ -448,7 +448,7 @@ object, then the Python code::
some code involving val
...
-calls ``val = myiter.next()`` repeatedly until :exc:`StopIteration` is
+calls ``val = next(myiter)`` repeatedly until :exc:`StopIteration` is
raised by the iterator. There are several ways to iterate over an
array that may be useful: default iteration, flat iteration, and
:math:`N`-dimensional enumeration.