class_docstr: Encapsulate PyStan3 specific logic.
class_docstr_tok: ["Encapsulate","PyStan3","specific","logic","."]
code: def __init__(
      self,
      *,
      posterior=None,
      posterior_model=None,
      posterior_predictive=None,
      predictions=None,
      prior=None,
      prior_model=None,
      prior_predictive=None,
      observed_data=None,
      constant_data=None,
      predictions_constant_data=None,
      log_likelihood=None,
      coords=None,
      dims=None,
      save_warmup=None,
      dtypes=None,
  ):
      self.posterior = posterior
      self.posterior_model = posterior_model
      self.posterior_predictive = posterior_predictive
      self.predictions = predictions
      self.prior = prior
      self.prior_model = prior_model
      self.prior_predictive = prior_predictive
      self.observed_data = observed_data
      self.constant_data = constant_data
      self.predictions_constant_data = predictions_constant_data
      self.log_likelihood = (
          rcParams["data.log_likelihood"]
          if log_likelihood is None
          else log_likelihood
      )
      self.coords = coords
      self.dims = dims
      self.save_warmup = (
          rcParams["data.save_warmup"]
          if save_warmup is None
          else save_warmup
      )
      self.dtypes = dtypes
  
      if (
          self.log_likelihood is True
          and self.posterior is not None
          and "log_lik" in self.posterior.param_names
      ):
          self.log_likelihood = ["log_lik"]
      elif isinstance(self.log_likelihood, bool):
          self.log_likelihood = None
  
      import stan  # pylint: disable=import-error
  
      self.stan = stan
  
imports: import re
  from collections import OrderedDict
  from copy import deepcopy
  from math import ceil
  import numpy
  import xarray
  from ..None import _log
  from ..rcparams import rcParams
  from .base import dict_to_dataset, generate_dims_coords, infer_stan_dtypes, make_attrs, requires
  from .inference_data import InferenceData
label_desc: Use image node_id 1 to create a new PyStan3Converter object  with example: obj = PyStan3Converter()