Skip to content

Potentially unused code in iris.coord #4956

@bouweandela

Description

@bouweandela

📰 Custom Issue

It looks like this class is not to be used anywhere and it not part of the public interface. Maybe it could be removed?

iris/lib/iris/coords.py

Lines 3156 to 3176 in ae2b59b

# See ExplicitCoord._group() for the description/context.
class _GroupIterator(Iterator):
def __init__(self, points):
self._points = points
self._start = 0
def __next__(self):
num_points = len(self._points)
if self._start >= num_points:
raise StopIteration
stop = self._start + 1
m = self._points[self._start]
while stop < num_points and self._points[stop] == m:
stop += 1
group = _GroupbyItem(m, slice(self._start, stop))
self._start = stop
return group
next = __next__

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions