Commit 0fe23164 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix bug in covariate_blockmodel.py with the overlapping case

parent 798d3cd9
......@@ -1223,7 +1223,7 @@ def reverse_map(prop, value_map):
if isinstance(value_map, PropertyMap):
value_map = value_map.a
if prop.max() >= len(value_map):
raise ValueError("value map is not large enough!")
raise ValueError("value map is not large enough! (%d, %d)" % (prop.max(), len(value_map)))
if prop.dtype != value_map.dtype:
prop = array(prop, dtype=value_map.dtype)
if value_map.dtype == "int64":
......
......@@ -229,7 +229,7 @@ class CovariateBlockState(BlockState):
condensation_graph(u, node_index,
self_loops=True,
parallel_edges=True)[:4]
rindex = u.new_vertex_property("int64_t")
rindex = zeros(nindex.a.max() + 1, dtype="int64")
reverse_map(nindex, rindex)
pmap(node_index, rindex)
base_u.vp["vmap"] = nindex
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment