Commit 536b3c3b authored by Tiago Peixoto's avatar Tiago Peixoto

inference: Add self-loops and parallel edges to test_inference.py

parent 79190e65
......@@ -22,6 +22,16 @@ seed_rng(42)
graph_tool.inference.set_test(True)
g = collection.data["football"]
# add self-loops
for i in range(10):
v = numpy.random.randint(g.num_vertices())
g.add_edge(v, v)
# add parallel edges
for e in list(g.edges())[:10]:
g.add_edge(e.source(), e.target())
ec = g.new_ep("int", randint(0, 10, g.num_edges()))
rec_p = g.new_ep("double", random(g.num_edges()))
......
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