Commit 9b4e7944 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

collection.konect: Fix handling of floating-point edge weights

parent 1b185bcb
......@@ -66,7 +66,7 @@ def load_koblenz_dir(dirname):
edges[:,1] += edges[:,0].max() + 1
g.add_edge_list(edges[:,:2])
if edges.shape[1] > 2:
g.ep.weight = g.new_edge_property("int")
g.ep.weight = g.new_edge_property("double")
g.ep.weight.a = edges[:,2]
if edges.shape[1] > 3:
g.ep.time = g.new_edge_property("int")
......
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