Hi Ales,
personally I would use a filter, exploiting the methods in_degree() and
out_degree().
I.e. something like

gv = GraphView(g,vfilt=lambda x: x.in_degree()+x.out_degree()>0)

If your graph is undirected, you can use only out_degree(). I strongly
advise you to read the documentation, there i splenty of information there.

Best,
Giuseppe


2017-03-20 14:08 GMT+01:00 Hobé Alex <[email protected]>:

> Hi Guys!
>
> What is the best way to remove vertices that do not have any edges?
>
> Best,
>
> Alex
>
> _______________________________________________
> graph-tool mailing list
> [email protected]
> https://lists.skewed.de/mailman/listinfo/graph-tool
>
>
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to