Dear community / Tiago

I have a hierarchical partition of a nested block state.
The original network contained 4453 vertices and 50051 edges.

state.print_summary()
l: 0, N: 4453, B: 126
l: 1, N: 126, B: 46
l: 2, N: 46, B: 20
l: 3, N: 20, B: 9
l: 4, N: 9, B: 3
l: 5, N: 3, B: 1

I want to extract the community label of each vertex of each possible hierarchical level.
To do this I wrote a loop based upon the guide at https://graph-tool.skewed.de/static/doc/demos/inference/inference.html
Where vertexblocksdf is simply a df populated with the vertex numbers 0-4452.

for idx in range(len(vertexblocksdf)):

r = levels.get_blocks()[idx] # group membership of node idx in level 0
vertexblocksdf.ix[idx, 'level0'] = r

r = levels.get_blocks()[r]     # group membership of node idx in level 1
vertexblocksdf.ix[idx, 'level1'] = r

r = levels.get_blocks()[r]     # group membership of node idx in level 2
vertexblocksdf.ix[idx, 'level2'] = r

r = levels.get_blocks()[r]     # group membership of node idx in level 3
vertexblocksdf.ix[idx, 'level3'] = r

r = levels.get_blocks()[r]     # group membership of node idx in level 4
vertexblocksdf.ix[idx, 'level4'] = r

r = levels.get_blocks()[r]     # group membership of node idx in level 5
vertexblocksdf.ix[idx, 'level5'] = r

But, I am getting strange results. My level0 column variables make sense, with 126 possibilities (as per l0 above). But my level1 column is a number between 0 and 13; of which none of my levels have 14 blocks. My level2 output is either 0 or 1, again doesn’t make sense! Level3-5 are all simply 0.
*this also reproduces the same behaviour if done manually without loop.

Any ideas??

James