Skip to main content
Ctrl+K
NetworkX 3.5.1rc0.dev0 documentation - Home NetworkX 3.5.1rc0.dev0 documentation - Home
  • Install
  • Tutorial
  • Backends
  • Reference
  • Gallery
  • Developer
  • Releases
  • Guides
  • Home Page
  • GitHub
  • Install
  • Tutorial
  • Backends
  • Reference
  • Gallery
  • Developer
  • Releases
  • Guides
  • Home Page
  • GitHub

Section Navigation

  • 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
    • DOT
    • Edge List
    • GEXF
    • GML
    • GraphML
    • JSON
    • LEDA
    • SparseGraph6
    • Pajek
    • Matrix Market
    • Network Text
  • Drawing
  • Randomness
  • Exceptions
  • Utilities
  • Backends
  • Configs
  • Glossary
  • Reference
  • Reading and writing graphs
  • LEDA
  • read_leda

read_leda#

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

Read graph in LEDA format from path.

Parameters:
pathfile or string

Filename or file handle to read. Filenames ending in .gz or .bz2 will be decompressed.

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")
On this page
  • read_leda()

© Copyright 2004-2025, NetworkX Developers.

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.16.1.