Inference library converters#

from_beanmachine([sampler, coords, dims])

Convert Bean Machine MonteCarloSamples object into an InferenceData object.

from_cmdstan([posterior, ...])

Convert CmdStan data into an InferenceData object.

from_cmdstanpy([posterior, ...])

Convert CmdStanPy data into an InferenceData object.

from_emcee([sampler, var_names, slices, ...])

Convert emcee data into an InferenceData object.

from_numpyro([posterior, prior, ...])

Convert NumPyro data into an InferenceData object.

from_pyjags([posterior, prior, ...])

Convert PyJAGS posterior samples to an ArviZ inference data object.

from_pyro([posterior, prior, ...])

Convert Pyro data into an InferenceData object.

from_pystan([posterior, ...])

Convert PyStan data into an InferenceData object.

IO / General conversion#

convert_to_inference_data(obj, *[, group, ...])

Convert a supported object to an InferenceData object.

convert_to_dataset(obj, *[, group, coords, dims])

Convert a supported object to an xarray dataset.

dict_to_dataset(data, *[, attrs, library, ...])

Convert a dictionary or pytree of numpy arrays to an xarray.Dataset.


Create an InferenceData object from a DataTree.

from_dict([posterior, posterior_predictive, ...])

Convert Dictionary data into an InferenceData object.


Initialize object from a json file.

from_netcdf(filename, *[, engine, ...])

Load netcdf file back into an arviz.InferenceData.


Convert InferenceData object to a DataTree.

to_json(idata, filename)

Save dataset as a json file.

to_netcdf(data, filename, *[, group, ...])

Save dataset as a netcdf file.


Initialize object from a zarr store or path.

to_zarr(data[, store])

Convert data to zarr, optionally saving to disk if store is provided.

General functions#

concat(*args[, dim, copy, inplace, reset_dim])

Concatenate InferenceData objects.

extract(data[, group, combined, var_names, ...])

Extract an InferenceData group or subset of it.

Data examples#


Get a string representation of all available datasets with descriptions.

load_arviz_data([dataset, data_home])

Load a local or remote pre-made dataset.