Previous topic

attributeValueDeal

Next topic

albert_barabasi_physrevlett_quick

This Page

loadNetwork

nepidemix.utilities.networkxtra.loadNetwork(file)

Utility function: Go through a number of file load methods and try to read a graph.

Currently tries gpickle and graphML.

Parameters :

file : str

Name of file as string.

Returns :

G : networkx.Graph or None

Returns the loaded graph or None if loading failed.

Notes

  • Not very elegant as it relies on catching exceptions.
  • Could fail if two formats are overlapping.