Commit 64471e25 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

minimize_nested_blockmodel_dl(): Fix bug with max_B parameter

parent 3de2946d
...@@ -1507,10 +1507,10 @@ def minimize_nested_blockmodel_dl(g, Bs=None, bs=None, min_B=None, max_B=None, ...@@ -1507,10 +1507,10 @@ def minimize_nested_blockmodel_dl(g, Bs=None, bs=None, min_B=None, max_B=None,
del state del state
if Bs is None: if Bs is None:
if minimize_state is not None: if minimize_state is not None and len(minimize_state.bs) > 0:
Bs = [ba.max() + 1 for ba in minimize_state.bs] Bs = [ba.max() + 1 for ba in minimize_state.bs]
if len(Bs) == 0: elif max_B is not None:
Bs = [1] Bs = [max_B, 1]
else: else:
Bs = [1] Bs = [1]
......
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