Skip to content

Commit

Permalink
Merge pull request numpy#15887 from mwtoews/next
Browse files Browse the repository at this point in the history
MAINT: Clean-up 'next = __next__' used for Python 2 compatibility
  • Loading branch information
mattip authored Apr 1, 2020
2 parents 3310cd0 + 30f8391 commit 9ccb42d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions numpy/lib/index_tricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,6 @@ def __next__(self):
def __iter__(self):
return self

next = __next__


@set_module('numpy')
class ndindex:
Expand Down Expand Up @@ -665,8 +663,6 @@ def __next__(self):
next(self._it)
return self._it.multi_index

next = __next__


# You can do all this with slice() plus a few special objects,
# but there's a lot to remember. This version is simpler because
Expand Down
4 changes: 0 additions & 4 deletions numpy/linalg/lapack_lite/fortran.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def __next__(self):
line = line.rstrip()
return line

next = __next__


class PushbackIterator:
"""PushbackIterator(iterable)
Expand All @@ -71,8 +69,6 @@ def __next__(self):
def pushback(self, item):
self.buffer.append(item)

next = __next__


def fortranSourceLines(fo):
"""Return an iterator over statement lines of a Fortran source file.
Expand Down
2 changes: 0 additions & 2 deletions numpy/ma/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2699,8 +2699,6 @@ def __next__(self):
return masked
return d

next = __next__


class MaskedArray(ndarray):
"""
Expand Down
2 changes: 0 additions & 2 deletions numpy/ma/tests/test_subclassing.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ def __setitem__(self, index, value):
def __next__(self):
return next(self._dataiter).__array__().view(type(self._original))

next = __next__


class ComplicatedSubArray(SubArray):

Expand Down

0 comments on commit 9ccb42d

Please sign in to comment.