class_docstr: Univariate slice sampler step method.
  
  Parameters
  ----------
  vars: list
      List of value variables for sampler.
  w: float
      Initial width of slice (Defaults to 1).
  tune: bool
      Flag for tuning (Defaults to True).
  model: PyMC Model
      Optional model for sampling step. Defaults to None (taken from context).
class_docstr_tok: ["Univariate","slice","sampler","step","method",".","Parameters","--","--","--","--","--","vars",":","list","List","of","value","variables","for","sampler",".","w",":","float","Initial","width","of","slice","(","Defaults","to","1",")",".","tune",":","bool","Flag","for","tuning","(","Defaults","to","True",")",".","model",":","PyMC","Model","Optional","model","for","sampling","step",".","Defaults","to","None","(","taken","from","context",")","."]
code: def __init__(
      self,
      vars=None,
      w=1.0,
      tune=True,
      model=None,
      iter_limit=np.inf,
      **kwargs,
  ):
      model = modelcontext(model)
      self.w = np.asarray(w).copy()
      self.tune = tune
      self.n_tunes = 0.0
      self.iter_limit = iter_limit
  
      if vars is None:
          vars = model.continuous_value_vars
      else:
          vars = get_value_vars_from_user_vars(vars, model)
  
      point = model.initial_point()
      shared = make_shared_replacements(point, vars, model)
      [logp], raveled_inp = join_nonshared_inputs(
          point=point,
          outputs=[model.logp()],
          inputs=vars,
          shared_inputs=shared,
      )
      self.logp = compile_pymc([raveled_inp], logp)
      self.logp.trust_input = True
  
      super().__init__(vars, shared)
  
file_path: pymc/pymc/step_methods/slicer.py
imports: from typing import Tuple
  import numpy
  import numpy.random
  from pymc.blocking import RaveledVars, StatsType
  from pymc.model import modelcontext
  from pymc.pytensorf import compile_pymc, join_nonshared_inputs, make_shared_replacements
  from pymc.step_methods.arraystep import ArrayStepShared
  from pymc.step_methods.compound import Competence
  from pymc.util import get_value_vars_from_user_vars
  from pymc.vartypes import continuous_types
label_desc: Use image node_id 1 to create a new Slice object from inherited base classes: ArrayStepShared with example: obj = Slice(vars, w, tune, model, iter_limit)