save_idata#

pymc_marketing.data.idata.io.save_idata(idata, path, *, groups=None, **kwargs)[source]#

Write idata in the format implied by path.

Parameters:
Return type:

Path

Returns:

path as a pathlib.Path.

Raises:
  • ImportError – If path is a Zarr store and zarr is not installed.

  • ValueError – If a Zarr store cannot hold names that differ only by letter case on this filesystem; see idata_to_zarr().

Examples

from pymc_marketing.data.idata import save_idata

save_idata(mmm.idata, "model.nc")
save_idata(mmm.idata, "model.zarr", groups=["posterior"])