NestedBlockState with base_state=OverlapBlockState array broadcasting error
This is reproducible on Ubuntu even with provided test data. Here is the code:
g = gt.collection.data["celegansneural"]
state= NestedBlockState(g,base_type=OverlapBlockState)
Yields the traceback:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-85-aaf1edba7efe> in <module>
----> 1 NestedBlockState(g,base_type=OverlapBlockState)
~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/nested_blockmodel.py in __init__(self, g, bs, base_type, state_args, hstate_args, hentropy_args, sampling, **kwargs)
102 recs_dl=False,
103 beta_dl=1.)
--> 104 self.levels = [base_type(g, b=bs[0], **self.state_args)]
105 for i, b in enumerate(bs[1:]):
106 state = self.levels[-1]
~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/overlap_blockmodel.py in __init__(self, g, b, B, recs, rec_types, rec_params, clabel, pclabel, deg_corr, dense_bg, **kwargs)
109 # substitute provided graph by its half-edge graph
110 g, b, node_index, half_edges, eindex, rec = \
--> 111 half_edge_graph(g, b, B, rec)
112
113 if len(recs) > 0:
~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/overlap_blockmodel.py in half_edge_graph(g, b, B, rec)
798
799 if b_array is not None:
--> 800 be.a = b_array
801
802 if rec is None:
~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/__init__.py in __set_array(self, v)
486 raise TypeError("cannot set property map values from array for" +
487 " property map of type: " + self.value_type())
--> 488 a[:] = v
489
490 a = property(get_array, __set_array,
ValueError: could not broadcast input array from shape (594) into shape (4718)