Layered overlapping model not working on GraphView

Hi there,

Layered overlapping models aren't working for GraphViews, due to the
following problematic lines in LayeredBlockState:

if overlap and self.ec is not None:
            self.base_ec = self.base_g.own_property(ec.copy())
            ec = agg_state.eindex.copy()
            pmap(ec, self.ec) <-- this line won't work as the GraphView
inherits eindex
            self.ec = ec.copy("int")

Is there an easy fix? Minimum working example below:

import numpy.random as rand
import graph_tool.all as gt

N = 20
L = 3
tg = gt.price_network(N) # generate random network size N
elayer = tg.new_ep('int')
E = len(tg.get_edges())
elayer.a = rand.randint(0,high=L,size=E) # randomly assign each edge to one
of L layers
tg.ep['elayer'] = elayer
utg = gt.GraphView(tg,rand.choice([True,False],size=N)) # take random
subsample of graph
stest = gt.minimize_nested_blockmodel_dl(utg,layers=True,overlap=True
                                                              
state_args=dict(ec=utg.ep.elayer,layers=True))

Thanks,
John

Hi,

Thanks for the bug report and minimal working example.

Could you please open an issue in gitlab so this can be tracked and fixed?

The mailing list is not the best place for this.

Best,
Tiago

Apologies, gitlab won't let me sign in with any account at the moment for
some reason otherwise I would.

The system seems to have thought that your multiple accounts were
spam... I have unblocked them.