On 04/29/2013 02:27 PM, Tiago de Paula Peixoto wrote:
On 04/29/2013 02:16 PM, Anatol Wegner wrote:
In general which graph format is fastest when writing/reading graphs? I've never benchmarked this extensively, but I do believe that either graphml or gml should be the fastest.
I am also getting errors when I load pickled and cpickled graphs...That is something like:
"TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type unicode" I'd need more information, such a very simple script where this happens... What python version are you using?
Cheers, Tiago
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool The script:
mt=load_graph('m.xml') import pickle f=open('graph','w') pickle.dump(mt,f) f.close() g=open('graph','r') m=pickle.load(g) Traceback (most recent call last): File "<pyshell#11>", line 1, in <module> m=pickle.load(g) File "/usr/lib/python2.7/pickle.py", line 1378, in load return Unpickler(file).load() File "/usr/lib/python2.7/pickle.py", line 858, in load dispatch[key](self) File "/usr/lib/python2.7/pickle.py", line 1217, in load_build setstate(state) File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line 1789, in __setstate__ self.load(stream, "xml") File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line 1518, in load props = self.__graph.ReadFromFile("", file_name, fmt) TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type unicode
thanks for the fast reply Anatol