pyphi.provenance.save_json#
- pyphi.provenance.save_json(data, directory, name, *, params=None, run_label=None, seed=None, note=None)[source]#
Write
datato a self-describing, non-clobbering JSON file.The file holds the envelope
{"provenance": ..., "params": ..., "data": ...}. The filename encodesparamsandrun_label(seeformat_stem()); an existing file is never overwritten (a_v2/_v3suffix is added instead). The provenance record stores the seed fromseedor, when omitted, fromparams["seed"]. numpy scalars and arrays indataare converted to JSON-native values.Returns the written path.