@@ -5083,7 +5083,21 @@ def read_graph_dl(instream: FileLike, directed: bool = True) -> Graph:
50835083
50845084
50855085def write_graph_edgelist (graph : Graph , outstream : FileLike ) -> None :
5086- """Type-annotated wrapper for ``igraph_write_graph_edgelist``."""
5086+ """Writes the graph in plain edge list format to an output stream.
5087+
5088+ THe plain edge list format records the structure of the graph _only_ and the
5089+ vertices of the graph will be referred to as numeric vertex IDs instead of
5090+ vertex names.
5091+
5092+ See `write_graph_ncol()` if you have vertex names and you want to use them
5093+ in the output file instead of IDs.
5094+
5095+ Parameters:
5096+ graph: the graph to write
5097+ outstream: the output file or stream to write the graph to. May be a
5098+ filename, a path-like object or a file-like object if it is backed
5099+ by a low-level file handle
5100+ """
50875101 # Create exit stack for graceful cleanup
50885102 with ExitStack () as py__stack :
50895103
@@ -5142,7 +5156,19 @@ def write_graph_leda(graph: Graph, outstream: FileLike, names: str = "name", wei
51425156
51435157
51445158def write_graph_graphml (graph : Graph , outstream : FileLike , prefixattr : bool = True ) -> None :
5145- """Type-annotated wrapper for ``igraph_write_graph_graphml``."""
5159+ """Writes the graph in GraphML format to an output stream.
5160+
5161+ The GraphML format preserves numeric, string and boolean attributes.
5162+
5163+ Parameters:
5164+ graph: the graph to write
5165+ outstream: the output file or stream to write the graph to. May be a
5166+ filename, a path-like object or a file-like object if it is backed
5167+ by a low-level file handle
5168+ prefixattr: whether to put a prefix in front of the attribute names to
5169+ ensure uniqueness if the graph has vertex and edge (or graph)
5170+ attributes with the same name
5171+ """
51465172 # Create exit stack for graceful cleanup
51475173 with ExitStack () as py__stack :
51485174
0 commit comments