class_docstr: An ensemble MCMC sampler
  
  If you are upgrading from an earlier version of emcee, you might notice
  that some arguments are now deprecated. The parameters that control the
  proposals have been moved to the :ref:`moves-user` interface (``a`` and
  ``live_dangerously``), and the parameters related to parallelization can
  now be controlled via the ``pool`` argument (:ref:`parallel`).
  
  Args:
      nwalkers (int): The number of walkers in the ensemble.
      ndim (int): Number of dimensions in the parameter space.
      log_prob_fn (callable): A function that takes a vector in the
          parameter space as input and returns the natural logarithm of the
          posterior probability (up to an additive constant) for that
          position.
      moves (Optional): This can be a single move object, a list of moves,
          or a "weighted" list of the form ``[(emcee.moves.StretchMove(),
          0.1), ...]``. When running, the sampler will randomly select a
          move from this list (optionally with weights) for each proposal.
          (default: :class:`StretchMove`)
      args (Optional): A list of extra positional arguments for
          ``log_prob_fn``. ``log_prob_fn`` will be called with the sequence
          ``log_prob_fn(p, *args, **kwargs)``.
      kwargs (Optional): A dict of extra keyword arguments for
          ``log_prob_fn``. ``log_prob_fn`` will be called with the sequence
          ``log_prob_fn(p, *args, **kwargs)``.
      pool (Optional): An object with a ``map`` method that follows the same
          calling sequence as the built-in ``map`` function. This is
          generally used to compute the log-probabilities for the ensemble
          in parallel.
      backend (Optional): Either a :class:`backends.Backend` or a subclass
          (like :class:`backends.HDFBackend`) that is used to store and
          serialize the state of the chain. By default, the chain is stored
          as a set of numpy arrays in memory, but new backends can be
          written to support other mediums.
      vectorize (Optional[bool]): If ``True``, ``log_prob_fn`` is expected
          to accept a list of position vectors instead of just one. Note
          that ``pool`` will be ignored if this is ``True``.
          (default: ``False``)
      parameter_names (Optional[Union[List[str], Dict[str, List[int]]]]):
          names of individual parameters or groups of parameters. If
          specified, the ``log_prob_fn`` will recieve a dictionary of
          parameters, rather than a ``np.ndarray``.
class_docstr_tok: ["An","ensemble","MCMC","sampler","If","you","are","upgrading","from","an","earlier","version","of","emcee",",","you","might","notice","that","some","arguments","are","now","deprecated",".","The","parameters","that","control","the","proposals","have","been","moved","to","the",":","ref",":","`","moves-user","`","interface","(","``","a","``","and","``","live_dangerously","``",")",",","and","the","parameters","related","to","parallelization","can","now","be","controlled","via","the","``","pool","``","argument","(",":","ref",":","`","parallel","`",")",".","Args",":","nwalkers","(","int",")",":","The","number","of","walkers","in","the","ensemble",".","ndim","(","int",")",":","Number","of","dimensions","in","the","parameter","space",".","log_prob_fn","(","callable",")",":","A","function","that","takes","a","vector","in","the","parameter","space","as","input","and","returns","the","natural","logarithm","of","the","posterior","probability","(","up","to","an","additive","constant",")","for","that","position",".","moves","(","Optional",")",":","This","can","be","a","single","move","object",",","a","list","of","moves",",","or","a","``","weighted","''","list","of","the","form","``","[","(","emcee.moves.StretchMove","(",")",",","0.1",")",",","...","]","``",".","When","running",",","the","sampler","will","randomly","select","a","move","from","this","list","(","optionally","with","weights",")","for","each","proposal",".","(","default",":",":","class",":","`","StretchMove","`",")","args","(","Optional",")",":","A","list","of","extra","positional","arguments","for","``","log_prob_fn","``",".","``","log_prob_fn","``","will","be","called","with","the","sequence","``","log_prob_fn","(","p",",","*","args",",","*","*","kwargs",")","``",".","kwargs","(","Optional",")",":","A","dict","of","extra","keyword","arguments","for","``","log_prob_fn","``",".","``","log_prob_fn","``","will","be","called","with","the","sequence","``","log_prob_fn","(","p",",","*","args",",","*","*","kwargs",")","``",".","pool","(","Optional",")",":","An","object","with","a","``","map","``","method","that","follows","the","same","calling","sequence","as","the","built-in","``","map","``","function",".","This","is","generally","used","to","compute","the","log-probabilities","for","the","ensemble","in","parallel",".","backend","(","Optional",")",":","Either","a",":","class",":","`","backends.Backend","`","or","a","subclass","(","like",":","class",":","`","backends.HDFBackend","`",")","that","is","used","to","store","and","serialize","the","state","of","the","chain",".","By","default",",","the","chain","is","stored","as","a","set","of","numpy","arrays","in","memory",",","but","new","backends","can","be","written","to","support","other","mediums",".","vectorize","(","Optional","[","bool","]",")",":","If","``","True","``",",","``","log_prob_fn","``","is","expected","to","accept","a","list","of","position","vectors","instead","of","just","one",".","Note","that","``","pool","``","will","be","ignored","if","this","is","``","True","``",".","(","default",":","``","False","``",")","parameter_names","(","Optional","[","Union","[","List","[","str","]",",","Dict","[","str",",","List","[","int","]","]","]","]",")",":","names","of","individual","parameters","or","groups","of","parameters",".","If","specified",",","the","``","log_prob_fn","``","will","recieve","a","dictionary","of","parameters",",","rather","than","a","``","np.ndarray","``","."]
code: def iteration(self):
      return self.backend.iteration
  
imports: import warnings
  from itertools import count
  from typing import Dict, List, Optional, Union
  import numpy
  from .backends import Backend
  from .model import Model
  from .moves import StretchMove
  from .pbar import get_progress_bar
  from .state import State
  from .utils import deprecated, deprecation_warning
label_desc: Use image node_id 4 for calling the EnsembleSampler obj's underlying member method code with example usage: obj.iteration() and returns: self