idata_to_zarr#

pymc_marketing.data.idata.utils.idata_to_zarr(idata, store, groups=None)[source]#

Save an InferenceData to a Zarr store.

TODO: Remove this shim once we require arviz>=1.0.

Works with zarr>=3, which is not supported by arviz.InferenceData.to_zarr(). Mirrors the approach taken by arviz>=1.0: idata.to_datatree().to_zarr(store).

Parameters:
idataaz.InferenceData

The inference data to save.

storestr or Path

Path to the Zarr store directory.

groupslist of str, optional

Groups to save. If None, all groups are saved.