On Sat, Feb 22, 2014 at 1:20 AM, Salvatore Palomino <[email protected]>wrote:
> Because the purpose of the function is to convert g into and undirected > graph. > And it does just that. > Also, when I use other functions that perform operations on graphs, they > always return the graph. Thus, its logical that it would return g and not > None. > No, they don't. They modify the graph in place and return None. E.g.: >>> g=igraph.Graph() >>> a=g.add_vertices(3) >>> print a None >>> b=g.add_edges([(0,1), (1,2)]) >>> print b None Gabor > > > > > On Fri, Feb 21, 2014 at 5:15 PM, Gábor Csárdi <[email protected]>wrote: > >> On Fri, Feb 21, 2014 at 8:10 PM, Salvatore Palomino < >> [email protected]> wrote: >> >>> i think it should return g as an undirected graph. Instead it returns >>> "None" >>> >> >> Why should it return the graph? >> >> Gabor >> >> >>> >>> >>> On Fri, Feb 21, 2014 at 4:07 PM, Gábor Csárdi <[email protected]>wrote: >>> >>>> On Fri, Feb 21, 2014 at 6:55 PM, Salvatore Palomino < >>>> [email protected]> wrote: >>>> >>>>> Hello! >>>>> >>>>> I am trying to convert my directed graph g into an undirected graph >>>>> using to_undirected(). >>>>> >>>>> << g = >>>>> GraphBase.Read_Pajek("C:/Users/Palomino/Downloads/109Senate-Rows.net") >>>>> << g = g.to_undirected(False) >>>>> << print g >>>>> None >>>>> >>>>> I don't know why it returns None. Can you help me out? >>>>> >>>> >>>> What should it return? The result of the conversion is in g, it does it >>>> in place. >>>> >>>> G. >>>> >>>> >>>> >>>>> >>>>> Thanks!!! >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> igraph-help mailing list >>>>> [email protected] >>>>> https://lists.nongnu.org/mailman/listinfo/igraph-help >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> igraph-help mailing list >>>> [email protected] >>>> https://lists.nongnu.org/mailman/listinfo/igraph-help >>>> >>>> >>> >>> _______________________________________________ >>> igraph-help mailing list >>> [email protected] >>> https://lists.nongnu.org/mailman/listinfo/igraph-help >>> >>> >> >> _______________________________________________ >> igraph-help mailing list >> [email protected] >> https://lists.nongnu.org/mailman/listinfo/igraph-help >> >> > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
