Skip to content

Commit

Permalink
remove write_gpickle
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudon committed Oct 18, 2023
1 parent 90a9fd4 commit 99af8cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/create_graph.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""create graph for simple example"""
import pandas as pd
import pickle
import matplotlib.pyplot as plt
import pickle
import networkx as nx
Expand Down Expand Up @@ -37,7 +38,8 @@ def create_sbm():
pickle.dump(adjacency, pickle_file)

# save .gpickle for community plotting
nx.write_gpickle(graph, "sbm_graph.gpickle")
with open("sbm_graph.gpickle", 'wb') as f:
pickle.dump(graph, f, pickle.HIGHEST_PROTOCOL)

# save with text file as alternative format
edges = pd.DataFrame()
Expand Down

0 comments on commit 99af8cb

Please sign in to comment.