Am 26.06.19 um 05:27 schrieb JeanPierre Paillet:
Hello Tiago: While attempting to save a binary structure I encountered this error RuntimeError: Pickling of "graph_tool.libgraph_tool_core.Vertex" instances is not enabled (http://www.boost.org/libs/python/doc/v2/pickle.html)
I don't understand why I was able to pickle.dump a stochastic block model (which contains vertices) and not this structure which contains a list of vertices.
Vertex and Edge descriptor objects are supposed to be lightweight, and they contain only a C++ pointer to the specific graph view to which they refer. This means that they cannot be pickled, as the parent Graph (Python) object cannot be resolved. If you want to pickle Vertex objects, you should convert them to ints first. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>