xgi.convert.bipartite_edges

Methods for converting to and from bipartite edgelists.

Functions

xgi.convert.bipartite_edges.from_bipartite_edgelist(edges, create_using=None)[source]

Generate a hypergraph from a list of lists.

Parameters:
  • e (tuple, list, or array of tuples, lists, or arrays, each of size 2) – A bipartite edgelist

  • create_using (Hypergraph constructor, optional) – The hypergraph to add the edges to, by default None

Returns:

The constructed hypergraph object

Return type:

Hypergraph object

See also

to_hyperedge_list

xgi.convert.bipartite_edges.to_bipartite_edgelist(H)[source]

Generate a hyperedge list from a hypergraph.

Parameters:

H (Hypergraph object) – The hypergraph of interest

Returns:

The hyperedge list

Return type:

list of sets

See also

from_hyperedge_list