[graph-tool] Graph I/O pickle

2013-04-29 Thread Anatol Wegner
Hi all, In general which graph format is fastest when writing/reading graphs? 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

Re: [graph-tool] Graph I/O pickle

2013-04-29 Thread Anatol Wegner
On 04/29/2013 05:51 PM, Tiago de Paula Peixoto wrote: On 04/29/2013 04:18 PM, Anatol Wegner wrote: 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

[graph-tool] clabel usage for partial constraints

2018-07-28 Thread Anatol Wegner
Hi, I have a question regarding the implementing partial constraints during blockmodel minimization. By partial constraints I mean that I have a group of vertices V1 that are pre-labeled into k clusters i.e. vertices from V1 that are in different clusters should not mix. Then there is a

[graph-tool] Error with get_edges_prob in layered sbm

2020-01-16 Thread Anatol Wegner
Hi, I am getting the following error when using get_edges_prob() with layered SBMs. Minimal example: import graph_tool.all as gt import numpy as np gr=gt.generate_sbm(b=np.array([0]*500+[1]*500),probs=np.array([[1,200],[200,1]])) etype=gr.new_edge_property('int') gr.ep.etype=etype for