Here is code that reproduces the issue for me.

I ran this from ipython in a virtual env.

output:

In [2]: run graphbug.py

27000 27000 {'test_str': <PropertyMap object with key type 'Edge' and value type 'string', for Graph 0x7f76db44b5d0, at 0x7f76db44b290>, 'test_int': <PropertyMap object with key type 'Edge' and value type 'int32_t', for Graph 0x7f76db44b5d0, at 0x7f76db44b550>}

27000 1 {}



On Thu, Jul 17, 2014 at 6:31 PM, ... <offonoffoffonoff@gmail.com> wrote:
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)