Empty PropertyMap returned when adding edges using add_edge_list with hashed=True
Hi
I'd like to add edges using add_edge_list
. My vertices are identified by strings. The documentation says that by using hashed==True
the values will be automatically hashed and a PropertyMap will be returned. However the returned PropertyMap is empty in my case. The snippet below shows the problem.
In [1]: import graph_tool as gt
In [2]: g = gt.Graph()
In [3]: pmap = g.add_edge_list([("a", "b")], hashed=True, string_vals=True)
In [4]: pmap
Out[4]: <PropertyMap object with key type 'Vertex' and value type 'string', for Graph 0x7fcdd39b1210, at 0x7fcdd39429d0>
In [5]: pmap.get_array()
In [6]: pmap.get_array() == None
Out[6]: True
I'm using Python 2.7.15 and compiled graph-tool at commit 7342a3ae
Am I doing something wrong or is this a Bug?
Thanks for your help.
Best, Leonhard