In the following, I noticed the data type of the property map changes. Any
ideas what is going on?
>>> graph_tool.all.__version__
'2.2.31 (commit 245d1e2c, Thu Mar 27 11:28:39 2014 +0100)
# having already built my graph
>>> graph.ep
{'weight': <PropertyMap object with key type 'Edge' and value type
'int32_t', for Graph 0x7f93019b8b90, at 0x7f930058c850>}
>>> graph.ep['weight'].a
PropertyArray([28, 18, 32, ..., 7, 8, 8], dtype=int32)
>>> graph.save(graph_file_name)
>>> graph2 = Graph()
>>> graph2.load(graph_file_name)
>>> graph2.ep
{'weight': <PropertyMap object with key type 'Edge' and value type
'double', for Graph 0x7f93001b7b10, at 0x7f92fc00b190>}
>>> graph2.ep['weight'].a
PropertyArray([ 28., 3., 18., ..., 11., 6., 55.])
Then it gets weirder...
>>> graph.ep['ONE_WAY'] = graph.new_edge_property('string')
>>> for edge in graph.edges():
... graph.ep['ONE_WAY'][edge] = 'TEST!'
>>> graph.ep
{'ONE_WAY': <PropertyMap object with key type 'Edge' and value type
'string', for Graph 0x7f93019b8b90, at 0x7f9327c0dc10>,
'weight': <PropertyMap object with key type 'Edge' and value type
'int32_t', for Graph 0x7f93019b8b90, at 0x7f930058c850>}
>>> graph.ep['ONE_WAY'][edge]
'TEST!'
>>> graph.save(graph_file_name)
>>> graph2 = Graph()
>>> graph2.load(graph_file_name)
>>> graph2.ep
{}
>>> graph.num_edges(),graph.num_vertices()
(78147, 29870)
>>> graph2.num_edges(),graph2.num_vertices()
(1, 29870)