class_docstr: Encapsulate PyStan specific logic.
class_docstr_tok: ["Encapsulate","PyStan","specific","logic","."]
docstr: Convert prior samples to xarray.
code: def prior_to_xarray(self):
      """Convert prior samples to xarray."""
      prior = self.prior
      # filter posterior_predictive and log_likelihood
      prior_predictive = self.prior_predictive
      if prior_predictive is None:
          prior_predictive = []
      elif isinstance(prior_predictive, str):
          prior_predictive = [prior_predictive]
  
      ignore = prior_predictive + ["lp__"]
  
      data, _ = get_draws(
          prior, ignore=ignore, warmup=False, dtypes=self.dtypes
      )
      attrs = get_attrs(prior)
      return dict_to_dataset(
          data,
          library=self.pystan,
          attrs=attrs,
          coords=self.coords,
          dims=self.dims,
      )
  
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 7 for calling the PyStanConverter obj's underlying member method code with example usage: obj.prior_to_xarray() and returns: dict_to_dataset