From c6f9f5dd27e08f0859a365e5884d2f4d7d957e0e Mon Sep 17 00:00:00 2001 From: Tamas Nepusz Date: Fri, 26 Jan 2024 13:07:38 +0100 Subject: [PATCH] doc: also fix the doc of _construct_graph_from_weighted_adjacency() --- src/igraph/io/adjacency.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/igraph/io/adjacency.py b/src/igraph/io/adjacency.py index 5f4c3a5c4..ff83df5a6 100644 --- a/src/igraph/io/adjacency.py +++ b/src/igraph/io/adjacency.py @@ -15,9 +15,11 @@ def _construct_graph_from_adjacency(cls, matrix, mode="directed", loops="once"): - a pandas.DataFrame (column/row names must match, and will be used as vertex names). @param mode: the mode to be used. Possible values are: - - C{"directed"} - the graph will be directed and a matrix - element gives the number of edges between two vertex. - - C{"undirected"} - alias to C{"max"} for convenience. + - C{"directed"} - the graph will be directed and a matrix element + specifies the number of edges between two vertices. + - C{"undirected"} - the graph will be undirected and a matrix element + specifies the number of edges between two vertices. The matrix must + be symmetric. - C{"max"} - undirected graph will be created and the number of edges between vertex M{i} and M{j} is M{max(A(i,j), A(j,i))} - C{"min"} - like C{"max"}, but with M{min(A(i,j), A(j,i))} @@ -82,9 +84,11 @@ def _construct_graph_from_weighted_adjacency( - a scipy.sparse matrix (will be converted to a COO matrix, but not to a dense matrix) @param mode: the mode to be used. Possible values are: - - C{"directed"} - the graph will be directed and a matrix - element gives the number of edges between two vertex. - - C{"undirected"} - alias to C{"max"} for convenience. + - C{"directed"} - the graph will be directed and a matrix element + specifies the number of edges between two vertices. + - C{"undirected"} - the graph will be undirected and a matrix element + specifies the number of edges between two vertices. The matrix must + be symmetric. - C{"max"} - undirected graph will be created and the number of edges between vertex M{i} and M{j} is M{max(A(i,j), A(j,i))} - C{"min"} - like C{"max"}, but with M{min(A(i,j), A(j,i))}