Commit f327fcb4 authored by Tiago Peixoto's avatar Tiago Peixoto

generate_sbm(): fix bug when B=1

parent fb37166a
Pipeline #263 passed with stage
in 235 minutes and 31 seconds
......@@ -978,6 +978,9 @@ def generate_sbm(b, probs, out_degs=None, in_degs=None, directed=False):
s = s[idx]
p = numpy.squeeze(numpy.array(probs[r, s]))
if len(p.shape) == 0: # B == 1 special case
p = numpy.array([p])
g.set_directed(directed)
libgraph_tool_generation.gen_sbm(g._Graph__graph,
......
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