Error with get_edges_prob in layered sbm

Hi,

I am getting the following error when using get_edges_prob() with
layered SBMs. Minimal example:

import graph_tool.all as gt
import numpy as np
gr=gt.generate_sbm(b=np.array([0]*500+[1]*500),probs=np.array([[10000,200],[200,10000]]))
etype=gr.new_edge_property('int')
gr.ep.etype=etype
for e in gr.edges():
gr.ep.etype[e]=np.random.choice([0,1,2,3])
state = gt.minimize_nested_blockmodel_dl(gr,
deg_corr=True,layers=True,state_args=dict(ec=gr.ep.etype,layers=True),verbose=False)

state.get_edges_prob([[2,32,0],[3,4,2]],spurious=[])

attachment.html (7.34 KB)

Hi Anatol,

This is indeed a bug. Thanks for the minimal example that shows the problem.

I've fixed this, and I will push it to git soon.

Best,
Tiago