diff --git a/README.md b/README.md index d5504ad8..735451d1 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,9 @@ Leo Torres Iacopo Iacopini -Maxime Lucas +Maxime Lucas -Giovanni Petri +Giovanni Petri Alice Patania diff --git a/docs/source/api/classes/xgi.classes.function.rst b/docs/source/api/classes/xgi.classes.function.rst index 41f48434..76c34eea 100644 --- a/docs/source/api/classes/xgi.classes.function.rst +++ b/docs/source/api/classes/xgi.classes.function.rst @@ -23,6 +23,8 @@ .. autofunction:: is_possible_order .. autofunction:: is_uniform .. autofunction:: max_edge_order + .. autofunction:: maximal_simplices + .. autofunction:: num_edges_order .. autofunction:: set_edge_attributes .. autofunction:: set_node_attributes .. autofunction:: unique_edge_sizes diff --git a/docs/source/index.rst b/docs/source/index.rst index 850e9757..965a8df9 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -48,6 +48,21 @@ The Comple\ **X** **G**\ roup **I**\ nteractions `(XGI) `_, Christian Bick, Elizabeth Gross, Heather A. Harrington, Michael T. Schaub. +* `From networks to optimal higher-order models of complex systems + `_, Renaud Lambiotte, Martin + Rosvall, and Ingo Scholtes. + Contributing ============ diff --git a/xgi/classes/hypergraph.py b/xgi/classes/hypergraph.py index 15a6cd05..2d61cf5e 100644 --- a/xgi/classes/hypergraph.py +++ b/xgi/classes/hypergraph.py @@ -74,7 +74,7 @@ class Hypergraph: Unique IDs are assigned to each node and edge internally and are used to refer to them throughout. - The `attr` keyword arguments are added as hypergraph attributes. To add node or ede + The `attr` keyword arguments are added as hypergraph attributes. To add node or edge attributes see :meth:`add_node` and :meth:`add_edge`. In addition to the methods listed in this page, other methods defined in the `stats` @@ -191,17 +191,23 @@ def __setitem__(self, attr, val): def __getattr__(self, attr): stat = getattr(self.nodes, attr, None) + word = "nodes" if stat is None: stat = getattr(self.edges, attr, None) + word = "edges" if stat is None: + word = None raise AttributeError( - f'stat "{attr}" not among available node or edge stats' + f"{attr} is not a method of Hypergraph or a recognized NodeStat or EdgeStat" ) def func(node=None, *args, **kwargs): val = stat(*args, **kwargs).asdict() return val if node is None else val[node] + func.__doc__ = f"""Equivalent to H.{word}.{attr}.asdict(). For accepted *args and + **kwargs, see documentation of H.{word}.{attr}.""" + return func def __lshift__(self, H2): diff --git a/xgi/stats/__init__.py b/xgi/stats/__init__.py index 667be0b3..8be6fccf 100644 --- a/xgi/stats/__init__.py +++ b/xgi/stats/__init__.py @@ -483,7 +483,7 @@ def nodestat_func(func): >>> H.my_degree() Traceback (most recent call last): - AttributeError: stat "my_degree" not among available node or edge stats + AttributeError: my_degree is not a method of Hypergraph or a recognized NodeStat or EdgeStat >>> H.nodes.my_degree Traceback (most recent call last): AttributeError: Stat 'my_degree' not defined