Source code for arviz.data.io_datatree

"""Conversion between InferenceData and DataTree."""

from .inference_data import InferenceData


[docs] def to_datatree(data): """Convert InferenceData object to a :class:`~datatree.DataTree`. Parameters ---------- data : InferenceData """ return data.to_datatree()
[docs] def from_datatree(datatree): """Create an InferenceData object from a :class:`~datatree.DataTree`. Parameters ---------- datatree : DataTree """ return InferenceData.from_datatree(datatree)