Skip to content

Conversation

@javeme
Copy link

@javeme javeme commented Sep 28, 2018

max(m.itervalues()) will raise ValueError when calling LPA.get_max_neighbor_label()
with a parameter isolated vertex, which has no neighbors.
It is reasonable to return label of the vertex itself if it's an isolated vertex.

pass empty sequence parameter to max():

>>> m=dict()
>>> max(m.itervalues())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: max() arg is an empty sequence

fix #9

max(m.itervalues()) will raise ValueError when calling LPA.get_max_neighbor_label()
with a parameter isolated vertex, which has no neighbors.
It is reasonable to return label of the vertex itself if it's an isolated vertex.

fix zzz24512653#9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LPA: ValueError: max() arg is an empty sequence

1 participant