summaryrefslogtreecommitdiff
path: root/networkx/algorithms/tree/mst.py
diff options
context:
space:
mode:
authorDan Schult <dschult@colgate.edu>2017-09-16 19:45:55 -0400
committerGitHub <noreply@github.com>2017-09-16 19:45:55 -0400
commit0d93bd37e3931acbd4f3921ca8debcf634b0a341 (patch)
tree5dfa00facb655198a290eb66bfc422ca4f20aa77 /networkx/algorithms/tree/mst.py
parent108ff600c455582ca3fba54e91eccdda604a330c (diff)
downloadnetworkx-0d93bd37e3931acbd4f3921ca8debcf634b0a341.tar.gz
MT doc Note: isolated nodes with self-loops case (#2670)
isolated nodes with self-loops included in tree as isolated nodes. Fixes #2667
Diffstat (limited to 'networkx/algorithms/tree/mst.py')
-rw-r--r--networkx/algorithms/tree/mst.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/networkx/algorithms/tree/mst.py b/networkx/algorithms/tree/mst.py
index 20a2df42..b7b8c1d9 100644
--- a/networkx/algorithms/tree/mst.py
+++ b/networkx/algorithms/tree/mst.py
@@ -537,6 +537,8 @@ def minimum_spanning_tree(G, weight='weight', algorithm='kruskal',
There may be more than one tree with the same minimum or maximum weight.
See :mod:`networkx.tree.recognition` for more detailed definitions.
+ Isolated nodes with self-loops are in the tree as edgeless isolated nodes.
+
"""
edges = minimum_spanning_edges(G, algorithm, weight, keys=True,
data=True, ignore_nan=ignore_nan)
@@ -596,6 +598,8 @@ def maximum_spanning_tree(G, weight='weight', algorithm='kruskal',
There may be more than one tree with the same minimum or maximum weight.
See :mod:`networkx.tree.recognition` for more detailed definitions.
+ Isolated nodes with self-loops are in the tree as edgeless isolated nodes.
+
"""
edges = maximum_spanning_edges(G, algorithm, weight, keys=True,
data=True, ignore_nan=ignore_nan)