Re: [graph-tool] Edge property map for int type

2019-01-11 Thread Alexandre Hannud Abdo
Well... The first maps each vertex to a vector of ints, i.e. `v => [4, 9, -2, 1]`, the second maps each vertex to a single int, i.e. `v => 4`. .~ยด On Fri, Jan 11, 2019 at 2:36 PM ashutosh wrote: > can you also tell me the difference between the two > > 'vector' and 'int' property types ? > > >

Re: [graph-tool] Edge property map for int type

2019-01-11 Thread Alexandre Hannud Abdo
Hi Ashuein, You're trying to push `int` values into a `vector` type. You should use a `int` for the property map instead. .~' On Friday, January 11, 2019, ashutosh wrote: > > pdat = > pd.DataFrame({'source':['A','B','C'],'target':['p','q','r'],'weight':[1,-1,2]}) > > graph =

Re: [graph-tool] Edge property map for int type

2019-01-11 Thread ashutosh
can you also tell me the difference between the two 'vector' and 'int' property types ? -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/ ___ graph-tool mailing list graph-tool@skewed.de

[graph-tool] Edge property map for int type

2019-01-11 Thread ashutosh
pdat = pd.DataFrame({'source':['A','B','C'],'target':['p','q','r'],'weight':[1,-1,2]}) graph = gt.Graph(directed=True) eprop = graph.new_edge_property("vector") vprop = graph.add_edge_list(pdat[['source','target','weight']].values.tolist(),