Commit 2c084876 authored by Tiago Peixoto's avatar Tiago Peixoto

solve_sbm_fugacities(): Improve numerical stability with zero degrees

parent 6a60a564
......@@ -1234,6 +1234,7 @@ def solve_sbm_fugacities(b, ers, out_degs=None, in_degs=None, multigraph=False,
if multigraph:
x[x==1] = 0.999
x[x==0] = 0.001
x = numpy.arctanh(2 * x - 1)
else:
x[x==0] = 1e-4
......
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