Commit 64789f16 authored by Tiago Peixoto's avatar Tiago Peixoto

mcmc_equilibrate(): Fix error in docstring

parent dc6d19ff
...@@ -63,8 +63,9 @@ def mcmc_equilibrate(state, wait=1000, nbreaks=2, max_niter=numpy.inf, ...@@ -63,8 +63,9 @@ def mcmc_equilibrate(state, wait=1000, nbreaks=2, max_niter=numpy.inf,
mcmc_args : ``dict`` (optional, default: ``{}``) mcmc_args : ``dict`` (optional, default: ``{}``)
Arguments to be passed to ``state.mcmc_sweep`` (or ``state.gibbs_sweep``). Arguments to be passed to ``state.mcmc_sweep`` (or ``state.gibbs_sweep``).
history : ``bool`` (optional, default: ``False``) history : ``bool`` (optional, default: ``False``)
If ``True``, a list of tuples of the form ``(iteration, entropy)`` will If ``True``, a list of tuples of the form ``(entropy, nmoves)`` will
be kept and returned. be kept and returned, where ``entropy`` is the current entropy and
``nmoves`` is the number of vertices moved.
callback : ``function`` (optional, default: ``None``) callback : ``function`` (optional, default: ``None``)
If given, this function will be called after each iteration. The If given, this function will be called after each iteration. The
function must accept the current state as an argument, and its return function must accept the current state as an argument, and its return
...@@ -93,7 +94,7 @@ def mcmc_equilibrate(state, wait=1000, nbreaks=2, max_niter=numpy.inf, ...@@ -93,7 +94,7 @@ def mcmc_equilibrate(state, wait=1000, nbreaks=2, max_niter=numpy.inf,
Returns Returns
------- -------
history : list of tuples of the form ``(iteration, entropy)`` history : list of tuples of the form ``(entropy, nmoves)``
Summary of the MCMC run. This is returned only if ``history == True``. Summary of the MCMC run. This is returned only if ``history == True``.
entropy : ``float`` entropy : ``float``
Current entropy value after run. This is returned only if ``history == Current entropy value after run. This is returned only if ``history ==
...@@ -181,7 +182,7 @@ def mcmc_equilibrate(state, wait=1000, nbreaks=2, max_niter=numpy.inf, ...@@ -181,7 +182,7 @@ def mcmc_equilibrate(state, wait=1000, nbreaks=2, max_niter=numpy.inf,
str(extra) if len(extra) > 0 else "")) str(extra) if len(extra) > 0 else ""))
if history: if history:
hist.append([S, nmoves] + extra) hist.append(tuple([S, nmoves] + extra))
if niter >= max_niter: if niter >= max_niter:
break break
......
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