Skip to content

Commit c2d6ea2

Browse files
committed
docs: updated docs to match accepted formats
1 parent 6200bf8 commit c2d6ea2

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

xgi/convert/higher_order_network.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ def to_hypergraph(data, create_using=None):
3030
Current known types are:
3131
* a Hypergraph object
3232
* a SimplicialComplex object
33+
* a DiHypergraph object: each directed edge (tail, head) is converted
34+
to an undirected edge containing the union of its tail and head members
3335
* list-of-iterables
3436
* dict-of-iterables
3537
* Pandas DataFrame (bipartite edgelist)
@@ -104,13 +106,12 @@ def to_dihypergraph(data, create_using=None):
104106
data : object to be converted
105107
Current known types are:
106108
* a DiHypergraph object
107-
* a SimplicialComplex object
108109
* list-of-iterables
109110
* dict-of-iterables
110-
* Pandas DataFrame (bipartite edgelist)
111-
* numpy matrix
112-
* numpy ndarray
113-
* scipy sparse matrix
111+
112+
.. note::
113+
Pandas DataFrame, numpy, and scipy sparse inputs are not yet
114+
implemented and will raise an error.
114115
create_using : Hypergraph constructor, optional (default=Hypergraph)
115116
Hypergraph type to create. If hypergraph instance, then cleared before populated.
116117
@@ -165,9 +166,10 @@ def to_simplicial_complex(data, create_using=None):
165166
* list-of-iterables
166167
* dict-of-iterables
167168
* Pandas DataFrame (bipartite edgelist)
168-
* numpy matrix
169-
* numpy ndarray
170-
* scipy sparse matrix
169+
170+
.. note::
171+
Construction from an incidence matrix (numpy ndarray or scipy.sparse
172+
array) is not yet implemented and will raise an error.
171173
create_using : Hypergraph graph constructor, optional (default=Hypergraph)
172174
Hypergraph type to create. If hypergraph instance, then cleared before
173175
populated.

xgi/core/hypergraph.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class Hypergraph:
4040
* Incidence matrix: numpy ndarray or scipy.sparse array
4141
* Hypergraph object
4242
* SimplicialComplex object
43+
* DiHypergraph object: each directed edge (tail, head) is converted to
44+
an undirected edge containing the union of its tail and head members.
4345
4446
**attr : dict, optional
4547
Attributes to add to the hypergraph as key, value pairs.

xgi/core/simplicialcomplex.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ class SimplicialComplex(Hypergraph):
4545
* simplex list
4646
* simplex dictionary
4747
* 2-column Pandas dataframe (bipartite edges)
48-
* Incidence matrix: numpy ndarray or scipy.sparse array
4948
* SimplicialComplex object
5049
* Hypergraph object
5150
51+
.. note::
52+
Construction from an incidence matrix (numpy ndarray or scipy.sparse
53+
array) is not yet implemented and will raise an error.
54+
5255
**attr : dict, optional
5356
Attributes to add to the simplicial complex as key, value pairs.
5457
By default, None.

0 commit comments

Comments
 (0)