class_docstr: Encapsulate NumPyro specific logic.
class_docstr_tok: ["Encapsulate","NumPyro","specific","logic","."]
docstr: Convert all available data to an InferenceData object.
  
  Note that if groups can not be created (i.e., there is no `trace`, so
  the `posterior` and `sample_stats` can not be extracted), then the InferenceData
  will not have those groups.
docstr_tok: ["Convert","all","available","data","to","an","InferenceData","object",".","Note","that","if","groups","can","not","be","created","(","i.e.",",","there","is","no","`","trace","`",",","so","the","`","posterior","`","and","`","sample_stats","`","can","not","be","extracted",")",",","then","the","InferenceData","will","not","have","those","groups","."]
code: def to_inference_data(self):
      """Convert all available data to an InferenceData object.
  
      Note that if groups can not be created (i.e., there is no `trace`, so
      the `posterior` and `sample_stats` can not be extracted), then the InferenceData
      will not have those groups.
      """
      return InferenceData(
          **{
              "posterior": self.posterior_to_xarray(),
              "sample_stats": self.sample_stats_to_xarray(),
              "log_likelihood": self.log_likelihood_to_xarray(),
              "posterior_predictive": self.posterior_predictive_to_xarray(),
              "predictions": self.predictions_to_xarray(),
              **self.priors_to_xarray(),
              "observed_data": self.observed_data_to_xarray(),
              "constant_data": self.constant_data_to_xarray(),
              "predictions_constant_data": self.predictions_constant_data_to_xarray(),
          }
      )
  
imports: import logging
  from typing import Callable, Optional
  import numpy
  from ..None import utils
  from ..rcparams import rcParams
  from .base import dict_to_dataset, requires
  from .inference_data import InferenceData
label_desc: Use image node_id 12 for calling the NumPyroConverter obj's underlying member method code with example usage: obj.to_inference_data() and returns: InferenceData