Commit 40c76afc authored by Tiago Peixoto's avatar Tiago Peixoto

Fix docstrings

parent 41dc36a4
Pipeline #403 passed with stage
in 365 minutes and 40 seconds
......@@ -1186,7 +1186,7 @@ def edge_endpoint_property(g, prop, endpoint, eprop=None):
>>> g = gt.random_graph(100, lambda: (3, 3))
>>> esource = gt.edge_endpoint_property(g, g.vertex_index, "source")
>>> print(esource.a)
[ 0 0 0 96 96 96 92 92 92 88 88 88 84 84 84 80 80 80 76 76 76 72 72 72
[ 0 0 0 96 96 96 92 92 92 88 88 88 84 84 84 80 80 80 76 76 76 72 72 72
68 68 68 64 64 64 60 60 60 56 56 56 52 52 52 48 48 48 44 44 44 40 40 40
36 36 36 32 32 32 28 28 28 24 24 24 20 20 20 16 16 16 12 12 12 8 8 8
4 4 4 99 99 99 1 1 1 2 2 2 3 3 3 5 5 5 6 6 6 7 7 7
......
......@@ -2056,10 +2056,10 @@ class BlockState(object):
>>> state.mcmc_sweep(niter=1000) # remove part of the transient
(...)
>>> for i in range(1000):
... state.mcmc_sweep(niter=10)
... ret = state.mcmc_sweep(niter=10)
... pe = state.collect_edge_marginals(pe)
>>> gt.bethe_entropy(g, pe)[0]
-21.162075...
-0.901611...
"""
if p is None:
......@@ -2110,10 +2110,10 @@ class BlockState(object):
>>> state.mcmc_sweep(niter=1000) # remove part of the transient
(...)
>>> for i in range(1000):
... state.mcmc_sweep(niter=10)
... ret = state.mcmc_sweep(niter=10)
... pv = state.collect_vertex_marginals(pv)
>>> gt.mf_entropy(g, pv)
7.578883...
26.887021...
>>> gt.graph_draw(g, pos=g.vp["pos"], vertex_shape="pie",
... vertex_pie_fractions=pv, output="polbooks_blocks_soft_B4.pdf")
<...>
......@@ -2176,10 +2176,10 @@ class BlockState(object):
>>> state.mcmc_sweep(niter=1000) # remove part of the transient
(...)
>>> for i in range(1000):
... state.mcmc_sweep(niter=10)
... ret = state.mcmc_sweep(niter=10)
... ph = state.collect_partition_histogram(ph)
>>> gt.microstate_entropy(ph)
146.181674...
129.330077...
"""
if h is None:
......
......@@ -1230,18 +1230,18 @@ def label_biconnected_components(g, eprop=None, vprop=None):
>>> g = gt.random_graph(100, lambda: poisson(2), directed=False)
>>> comp, art, hist = gt.label_biconnected_components(g)
>>> print(comp.a)
[26 26 26 26 26 26 26 26 19 25 26 26 23 26 26 26 26 6 26 24 18 26 26 13 26
26 26 26 26 26 26 26 26 26 26 16 29 26 26 26 26 26 26 15 26 26 26 26 26 0
26 26 12 2 26 26 26 26 26 26 26 26 9 3 26 28 26 26 8 26 4 26 26 26 14
26 26 26 26 30 11 26 26 26 20 26 26 27 26 33 26 22 17 7 5 32 21 26 1 10
31]
[26 26 26 26 26 26 26 26 19 25 26 26 23 26 26 26 26 6 26 24 18 26 26 13
26 26 26 26 26 26 26 26 26 26 26 16 29 26 26 26 26 26 26 15 26 26 26 26
26 0 26 26 12 2 26 26 26 26 26 26 26 26 9 3 26 28 26 26 8 26 4 26
26 26 14 26 26 26 26 30 11 26 26 26 20 26 26 27 26 33 26 22 17 7 5 32
21 26 1 10 31]
>>> print(art.a)
[1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0
1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0
1 0 0 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 0]
>>> print(hist)
[ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 68 1 1 1 1 1 1 1]
[ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 68 1 1 1 1 1 1 1]
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment