Admin message

Please use the issue tracker only to report bugs (i.e. errors in the library that need to be fixed) or feature requests.

Please check if the current git version also has the same problem. An easy way to do this is to use google colab!

For questions about how to compile, install or use the library, please use instead the web forum at https://forum.skewed.de/c/graph-tool.


(If unsure, use the forum first.)


IMPORTANT: When opening new issues, please fill out the required information listed in the issue template!

Property array is not updated after a shrink_to_fit() call

Hello, (First thanks for the tool, I've been using it since two weeks now, and its really nice.)

I encounter the following issue: First I create a graph and add some edges and an edge property. Then, if I remove some edge and call the shrink_to_fit, it resize the a array of the property. But if I re-add an edge, it is not added in the a array until I call again shrink_to_fit. Is this a intentioned behaviour ?

Example:

g = Graph()  
g.add_edge(0,1)
g.add_edge(0,2)
g.add_edge(0,3)
w = g.new_ep('int')
len(w.a) == 3 # true
g.remove_edge(g.edge(0,3))
g.shrink_to_fit()
len(w.a) == 2 # true
g.add_edge(1,0)
len(w.a) == 3 # false
  

I have a related problem when removing edges with remove_parallel_edges(). The size of the property array is not updated after the removal. Moreover, when getting a new edge property with g.new_ep(), the property array has a size corresponding to the graph before the removal...

Edited Apr 09, 2018 by dulac
Assignee Loading
Time tracking Loading