Assortativity with vertex property map
Hi,
I'm using the latest graph-tool version in Linux (Ubuntu 16.04) and Mac (High Sierra 10.13.4). I'm trying to calculate the assortativity of a network (gw) given certain vertex categories (prefixes), that is, a vertex property map (gw.vp.prefixes). The vertex property map is originally composed of letters, strings, and I tried to modify them to numbers but still doesn't work. I run the following:
assortativity_w = gt.assortativity(gw, gw.vp.prefixes)
and get the following error:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-7-f548121efe30> in <module>()
----> 1 assortativity_w = gt.assortativity(gw, gw.vp.prefixes)
/usr/local/lib/python3.6/site-packages/graph_tool/correlations/__init__.py in assortativity(g, deg)
115 """
116 return libgraph_tool_correlations.\
--> 117 assortativity_coefficient(g._Graph__graph, _degree(g, deg))
118
119
RuntimeError: No static implementation was found for the desired routine. This is a graph_tool bug. :-( Please submit a bug report at http://graph-tool.skewed.de/issues. What follows is debug information.
Action: std::__1::__bind<graph_tool::get_assortativity_coefficient, std::__1::placeholders::__ph<1> const&, std::__1::placeholders::__ph<2> const&, std::__1::reference_wrapper<double>, std::__1::reference_wrapper<double> >
Arg 1: std::__1::reference_wrapper<boost::undirected_adaptor<boost::adj_list<unsigned long> > >
Arg 2: graph_tool::scalarS<boost::checked_vector_property_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::typed_identity_property_map<unsigned long> > >
Any help? Thanks!