Hi,
I am getting the following error when using get_edges_prob() with
layered SBMs. Minimal example:
state.get_edges_prob([[2,32,0],[3,4,2]],spurious=[])
--------------------------------------------------------------------------- UnboundLocalError Traceback (most recent call last) <ipython-input-30-a1758ce2345d> in <module>() 7 gr.ep.etype[e]=np.random.choice([0,1,2,3]) 8 state = gt.inference.minimize_nested_blockmodel_dl(gr, deg_corr=True,layers=True,state_args=dict(ec=gr.ep.etype,layers=True),verbose=False) ----> 9 state.get_edges_prob([[2,32,0],[3,4,2]],spurious=[]) /usr/lib/python2.7/dist-packages/graph_tool/inference/nested_blockmodel.py in get_edges_prob(self, missing, spurious, entropy_args) 481 lstate._state.clear_egroups() 482 --> 483 L += lstate.get_edges_prob(missing, spurious, entropy_args=eargs) 484 if isinstance(self.levels[0], LayeredBlockState): 485 missing = [(lstate.b[u], lstate.b[v], l_) for u, v, l_ in missing] /usr/lib/python2.7/dist-packages/graph_tool/inference/layered_blockmodel.py in get_edges_prob(self, missing, spurious, entropy_args) 934 state = self.layer_states[l[0]] 935 state.g.remove_edge(e) --> 936 for u, v, l in old_es: 937 if not l[1]: 938 state = self.agg_state UnboundLocalError: local variable 'old_es' referenced before assignment Regards, Anatol