Skip to content

Insert scale refactoring #32

@jazzsta

Description

@jazzsta

Hello,
apparently in the later versions of python StopIteration exception raises a runtime error. Here there is more on that:
https://peps.python.org/pep-0479/

Therefore we have to change the insert_scale method code, in particular line 1099

sup_components = dict((v, next(g.component_roots_iter(v))) for v in sup_vertices)

raises a runtime error and stops execution. I replaced it with

sup_components = dict()
for v in sup_vertices:
iteratorr = g.component_roots_iter(v)
while True:
try:
sup_components[v] = next(iteratorr)
except StopIteration:
break

And now it seems to work fine.
Can you verify that this is correct ?

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