From 13e283c2953b9cde2b6e509c7b34db7c5b8bf773 Mon Sep 17 00:00:00 2001 From: Maxime Lucas Date: Tue, 11 Apr 2023 12:27:35 +0200 Subject: [PATCH] fix: improve degree_counts doc --- xgi/classes/function.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xgi/classes/function.py b/xgi/classes/function.py index d27333feb..6d88ddaaa 100644 --- a/xgi/classes/function.py +++ b/xgi/classes/function.py @@ -177,7 +177,9 @@ def edge_neighborhood(H, n, include_self=False): def degree_counts(H, order=None): - """Returns a list of the frequency of each degree value. + """Returns a list of the the number of occurrences of each degree value. + + The counts correspond to degrees from 0 to max(degree). Parameters ---------- @@ -198,6 +200,10 @@ def degree_counts(H, order=None): Note: the bins are width one, hence len(list) can be large (Order(num_edges)) + The degree is defined as the number of edges to which a node belongs. + A node belonging only to a singleton edge will thus have degree 1 and + contribute accordingly to the degree count. + Examples -------- >>> import xgi