I was working with graph-tool and I was able to use
state = gt.minimize_blockmodel_dl(g) e = state.get_matrix() plt.matshow(e.todense())
I wo