Skip to content
Browse files

v 0.2.5 - fix bug with merges when key is not supplied

  • Loading branch information...
1 parent bd6adac commit dcea29549a4333ab55a1ea859906fd71ff87beae @craigds committed May 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 pygvm/__init__.py
View
4 pygvm/__init__.py
@@ -323,7 +323,6 @@ def _add_members():
self._update_pairs(c)
continue
-
#identify cheapest merge
merge_pair = self.pairs.peek()
merge_t = merge_pair and merge_pair.value or MAX_FLOAT
@@ -351,7 +350,8 @@ def _add_members():
(c1, c2) = (c2, c1)
c1.add_cluster(c2)
cluster_keys[c1].extend(cluster_keys.pop(c2, []))
- cluster_keys[c2] = [key]
+ if key is not None:
+ cluster_keys[c2] = [key]
c2.set(mass, coords, None)
if i % step == 0:
_add_members()

0 comments on commit dcea295

Please sign in to comment.
Something went wrong with that request. Please try again.