Skip to content

Commit

Permalink
fix: improve degree_counts doc (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximelucas authored Apr 11, 2023
1 parent 6f09560 commit b42a04f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xgi/classes/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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
----------
Expand All @@ -197,6 +199,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
Expand Down

0 comments on commit b42a04f

Please sign in to comment.