This page is documentation for a DEVELOPMENT / PRE-RELEASE version. Switch to stable version
Logo image Logo image
  • Install
  • Tutorial
  • Reference
  • Releases
  • Developer
  • Gallery
  • Guides
    • devel (latest)
    • current (stable)
  • Introduction
  • Graph types
  • Algorithms
  • Functions
  • Graph generators
  • Linear algebra
  • Converting to and from other data formats
  • Relabeling nodes
  • Reading and writing graphs
    • Adjacency List
    • Multiline Adjacency List
    • Edge List
    • GEXF
    • GML
    • GraphML
    • JSON
    • LEDA
    • SparseGraph6
    • Pajek
    • Matrix Market
  • Drawing
  • Randomness
  • Exceptions
  • Utilities
  • Glossary

read_leda#

read_leda(path, encoding='UTF-8')[source]#

Read graph in LEDA format from path.

Parameters:
pathfile or string

File or filename to read. Filenames ending in .gz or .bz2 will be uncompressed.

Returns:
GNetworkX graph

References

[1]

http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html

Examples

G=nx.read_leda(‘file.leda’)

© Copyright 2004-2022, NetworkX Developers.

Created using Sphinx 5.1.1.