Skip to content

Commit 3615bb5

Browse files
committed
update example code
1 parent 51447cd commit 3615bb5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

cliquepicking_python/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ G.add_edge(5, 4)
5959
print(cp.mec_size(list(G.edges)))
6060

6161
sampler = cp.MecSampler(list(G.edges))
62-
for _i in range(5):
62+
for _ in range(5):
6363
print(nx.DiGraph(sampler.sample_dag()))
6464

65-
for _i in range(5):
65+
for _ in range(5):
6666
print(sampler.sample_order())
6767
```
6868

cliquepicking_python/test/example.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
G.add_edge(4, 5)
2626
G.add_edge(5, 4)
2727
print(cp.mec_size(list(G.edges)))
28-
sample_dags = cp.mec_sample_dags(list(G.edges), 5)
29-
for dag in sample_dags:
30-
print(nx.DiGraph(dag))
31-
sample_orders = cp.mec_sample_orders(list(G.edges), 5)
32-
for order in sample_orders:
33-
print(order)
28+
29+
sampler = cp.MecSampler(list(G.edges))
30+
for _ in range(5):
31+
print(nx.DiGraph(sampler.sample_dag()))
32+
33+
for _ in range(5):
34+
print(sampler.sample_order())

0 commit comments

Comments
 (0)