xgi.convert.hypergraph_dict
Method for converting from a standardized dictionary.
Functions
- xgi.convert.hypergraph_dict.dict_to_hypergraph(data, nodetype=None, edgetype=None, max_order=None)[source]
A function to read a file in a standardized JSON format.
- Parameters:
data (dict) – A dictionary in the hypergraph JSON format
nodetype (type, optional) – Type that the node IDs will be cast to
edgetype (type, optional) – Type that the edge IDs will be cast to
max_order (int, optional) – Maximum order of edges to add to the hypergraph
- Returns:
The loaded hypergraph
- Return type:
A Hypergraph object
- Raises:
XGIError – If the JSON is not in a format that can be loaded.
See also
read_json