Skip to content

Commit

Permalink
Fix broken "See Also" links
Browse files Browse the repository at this point in the history
  • Loading branch information
nwlandry committed Sep 6, 2024
1 parent 98feaa5 commit 612447b
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 23 deletions.
2 changes: 1 addition & 1 deletion xgi/algorithms/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def edge_neighborhood(H, n, include_self=False):
See Also
--------
neighbors
~xgi.core.views.IDView.neighbors
Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions xgi/convert/bipartite_edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def from_bipartite_edgelist(edges):
See Also
--------
to_hyperedge_list
~xgi.convert.edgelist.from_hyperedge_list
"""
if len(edges[0]) == 3: # directed
H = DiHypergraph()
Expand Down Expand Up @@ -55,7 +55,7 @@ def to_bipartite_edgelist(H):
See Also
--------
from_hyperedge_list
~xgi.convert.edgelist.to_hyperedge_list
"""
if isinstance(H, DiHypergraph):
edgelist = []
Expand Down
2 changes: 1 addition & 1 deletion xgi/convert/higher_order_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def to_hypergraph(data, create_using=None):
See Also
--------
from_max_simplices : Constructs a hypergraph from the maximal simplices of a simplicial complex.
~xgi.utils.utilities.from_max_simplices : Constructs a hypergraph from the maximal simplices of a simplicial complex.
"""
if data is None:
Expand Down
9 changes: 8 additions & 1 deletion xgi/convert/hyperedges.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def from_hyperedge_dict(d, create_using=None):
See Also
--------
to_hyperedge_dict
from_hyperedge_list
to_hyperedge_list
"""
H = empty_hypergraph(create_using)
H.add_edges_from((members, uid) for uid, members in d.items())
Expand All @@ -54,6 +55,8 @@ def to_hyperedge_dict(H):
See Also
--------
from_hyperedge_dict
to_hyperedge_list
from_hyperedge_list
"""
return H.edges.members(dtype=dict)

Expand All @@ -76,6 +79,8 @@ def from_hyperedge_list(d, create_using=None, max_order=None):
See Also
--------
to_hyperedge_list
from_hyperedge_dict
to_hyperedge_dict
"""
H = empty_hypergraph(create_using)
if isinstance(H, SimplicialComplex):
Expand All @@ -101,5 +106,7 @@ def to_hyperedge_list(H):
See Also
--------
from_hyperedge_list
to_hyperedge_dict
from_hyperedge_dict
"""
return H.edges.members()
8 changes: 7 additions & 1 deletion xgi/convert/hypergraph_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def to_hypergraph_dict(H):
If node IDs will be collapsed when casting to a string.
XGIError
If edge Ids will be collapsed when casting to a string.
See Also
--------
~xgi.readwrite.json.read_json
~xgi.readwrite.json.write_json
"""
data = {}
data["type"] = get_network_type(H)
Expand Down Expand Up @@ -94,7 +99,8 @@ def from_hypergraph_dict(data, nodetype=None, edgetype=None, max_order=None):
See Also
--------
read_json
~xgi.readwrite.json.read_json
~xgi.readwrite.json.write_json
"""
H = empty_hypergraph()
Expand Down
4 changes: 2 additions & 2 deletions xgi/convert/incidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def from_incidence_matrix(d, create_using=None, nodelabels=None, edgelabels=None
See Also
--------
incidence_matrix
~xgi.linalg.hypergraph_matrix.incidence_matrix
to_incidence_matrix
"""
I = coo_array(d)
Expand Down Expand Up @@ -92,7 +92,7 @@ def to_incidence_matrix(H, sparse=True, index=False):
See Also
--------
incidence_matrix
~xgi.linalg.hypergraph_matrix.incidence_matrix
from_incidence_matrix
"""
return incidence_matrix(H, sparse=sparse, index=index)
10 changes: 7 additions & 3 deletions xgi/core/dihypergraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ class DiHypergraph:
**attr : dict, optional, default: None
Attributes to add to the hypergraph as key, value pairs.
See Also
--------
~xgi.core.hypergraph.Hypergraph
Notes
-----
Unique IDs are assigned to each node and edge internally and are used to refer to
Expand Down Expand Up @@ -145,10 +149,10 @@ def __init__(self, incoming_data=None, **attr):
self._edge_attr = self._edge_attr_dict_factory()

self._nodeview = DiNodeView(self)
"""A :class:`~xgi.core.direportviews.DiNodeView` of the directed hypergraph."""
"""A :class:`~xgi.core.views.DiNodeView` of the directed hypergraph."""

self._edgeview = DiEdgeView(self)
"""An :class:`~xgi.core.direportviews.DiEdgeView` of the directed hypergraph."""
"""An :class:`~xgi.core.views.DiEdgeView` of the directed hypergraph."""

if incoming_data is not None:
# This import needs to happen when this function is called, not when it is
Expand Down Expand Up @@ -1043,7 +1047,7 @@ def freeze(self):
See Also
--------
frozen : Method that raises an error when a user tries to modify the hypergraph
~xgi.exception.frozen : Method that raises an error when a user tries to modify the hypergraph
is_frozen : Check whether a dihypergraph is frozen
Examples
Expand Down
11 changes: 8 additions & 3 deletions xgi/core/hypergraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ class Hypergraph:
Attributes to add to the hypergraph as key, value pairs.
By default, None.
See Also
--------
~xgi.core.simplicialcomplex.SimplicialComplex
~xgi.core.dihypergraph.DiHypergraph
Notes
-----
Unique IDs are assigned to each node and edge internally and are used to refer to
Expand Down Expand Up @@ -128,10 +133,10 @@ def __init__(self, incoming_data=None, **attr):
self._edge_attr = self._edge_attr_dict_factory()

self._nodeview = NodeView(self)
"""A :class:`~xgi.core.reportviews.NodeView` of the hypergraph."""
"""A :class:`~xgi.core.views.NodeView` of the hypergraph."""

self._edgeview = EdgeView(self)
"""An :class:`~xgi.core.reportviews.EdgeView` of the hypergraph."""
"""An :class:`~xgi.core.views.EdgeView` of the hypergraph."""

if incoming_data is not None:
# This import needs to happen when this function is called, not when it is
Expand Down Expand Up @@ -1490,7 +1495,7 @@ def freeze(self):
See Also
--------
frozen : Method that raises an error when a user tries to modify the hypergraph
~xgi.exception.frozen : Method that raises an error when a user tries to modify the hypergraph
is_frozen : Check whether a hypergraph is frozen
Examples
Expand Down
2 changes: 1 addition & 1 deletion xgi/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def neighbors(self, id, s=1):
See Also
--------
~xgi.core.function.edge_neighborhood
~xgi.algorithms.properties.edge_neighborhood
Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion xgi/generators/uniform.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def uniform_erdos_renyi_hypergraph(n, m, p, p_type="degree", seed=None):
See Also
--------
random_hypergraph
~xgi.generators.random.random_hypergraph
"""
if seed is not None:
np.random.seed(seed)
Expand Down
2 changes: 1 addition & 1 deletion xgi/stats/diedgestats.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This module is part of the stats package, and it defines edge-level statistics. That
is, each function defined in this module is assumed to define an edge-quantity mapping.
Each callable defined here is accessible via a `Network` object, or a
:class:`~xgi.core.reportviews.DiEdgeView` object. For more details, see the `tutorial
:class:`~xgi.core.views.DiEdgeView` object. For more details, see the `tutorial
<https://xgi.readthedocs.io/en/stable/api/tutorials/focus_6.html>`_.
Examples
Expand Down
2 changes: 1 addition & 1 deletion xgi/stats/dinodestats.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This module is part of the stats package, and it defines node-level statistics. That
is, each function defined in this module is assumed to define a node-quantity mapping.
Each callable defined here is accessible via a `Network` object, or a
:class:`~xgi.core.reportviews.NodeView` object. For more details, see the `tutorial
:class:`~xgi.core.views.NodeView` object. For more details, see the `tutorial
<https://xgi.readthedocs.io/en/stable/api/tutorials/focus_6.html>`_.
Examples
Expand Down
2 changes: 1 addition & 1 deletion xgi/stats/edgestats.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This module is part of the stats package, and it defines edge-level statistics. That
is, each function defined in this module is assumed to define an edge-quantity mapping.
Each callable defined here is accessible via a `Network` object, or a
:class:`~xgi.core.reportviews.EdgeView` object. For more details, see the `tutorial
:class:`~xgi.core.views.EdgeView` object. For more details, see the `tutorial
<https://xgi.readthedocs.io/en/stable/api/tutorials/focus_6.html>`_.
Examples
Expand Down
2 changes: 1 addition & 1 deletion xgi/stats/nodestats.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This module is part of the stats package, and it defines node-level statistics. That
is, each function defined in this module is assumed to define a node-quantity mapping.
Each callable defined here is accessible via a `Network` object, or a
:class:`~xgi.core.reportviews.NodeView` object. For more details, see the `tutorial
:class:`~xgi.core.views.NodeView` object. For more details, see the `tutorial
<https://xgi.readthedocs.io/en/stable/api/tutorials/focus_6.html>`_.
Examples
Expand Down
6 changes: 3 additions & 3 deletions xgi/utils/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@ def hist(vals, bins=10, bin_edges=False, density=False, log_binning=False):
Parameters
----------
vals : Numpy array
vals : numpy.ndarray
The array of values
bins : int, list, or Numpy array
bins : int, list, or numpy.ndarray
The number of bins or the bin edges.
By default, 10.
bin_edges : bool
Expand All @@ -470,7 +470,7 @@ def hist(vals, bins=10, bin_edges=False, density=False, log_binning=False):
Returns
-------
Pandas DataFrame
~pandas.DataFrame
A two-column table with "bin_center" and "value" columns,
where "value" is a count or a probability. If `bin_edges`
is True, outputs two additional columns, `bin_lo` and `bin_hi`,
Expand Down

0 comments on commit 612447b

Please sign in to comment.