xgi.stats.dinodestat_func#
- dinodestat_func(func)[source]#
Decorator that allows arbitrary functions to behave like
DiNodeStat
objects.Works identically to
nodestat()
. For extended documentation, seenodestat_func()
.- Parameters:
func (callable) – Function or callable with signature func(net, bunch), where net is the network and bunch is an iterable of edges in net. The call func(net, bunch) must return a dict with pairs of the form (edge: value) where edge is in bunch and value is the value of the statistic at edge.
- Returns:
The decorated callable unmodified, after registering it in the stats framework.
- Return type:
callable
See also