arviz.to_json#

arviz.to_json(idata, filename)[source]#

Save dataset as a json file.

Will use the faster ujson (ultrajson/ultrajson) if it is available.

WARNING: Only idempotent in case idata is InferenceData.

Parameters:
idataInferenceData

Object to be saved

filenamestr

name or path of the file to load trace

Returns:
str

filename saved to