igraph and usage of Read(klass, f, format=None, *args, **kwds) question

Discussion in 'Python' started by ishwar.rattan@gmail.com, Apr 4, 2012.

  1. Guest

    I have a file with with adjacency list of an undirected graph one vertex list per input line [0 1, 1 2 3, 2 1, 3 1] assume a newline for commas (file is named adjl.txt). Can some one give an example of loading this into graph of 4 vertices?

    import igraph
    g = igraph.Graph()
    g.Read("adjl.txt", "edgelist")
    does not work..

    Help will be appreciated.
    -ishwar
     
    , Apr 4, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Freeman
    Replies:
    8
    Views:
    8,282
    tcena9
    Feb 16, 2011
  2. er
    Replies:
    2
    Views:
    766
  3. David Freeman
    Replies:
    5
    Views:
    382
    Nay Myo Aung
    Dec 27, 2004
  4. ish
    Replies:
    1
    Views:
    327
    alex23
    Apr 5, 2012
  5. Piotr Dobrogost
    Replies:
    6
    Views:
    225
    Steven D'Aprano
    Aug 30, 2013
  6. Fabrice POMBET
    Replies:
    0
    Views:
    189
    Fabrice POMBET
    Aug 28, 2013
  7. Ian Kelly
    Replies:
    1
    Views:
    156
  8. length power
    Replies:
    2
    Views:
    246
    Rustom Mody
    Apr 10, 2014
Loading...