dump
- negmas.serialization.dump(d: Any, file_name: str | PathLike | Path, sort_keys=True, compact=False) None[source]
Saves an object depending on the extension of the file given. If the filename given has no extension,
DEFAULT_DUMP_EXTENSIONwill be used.- Parameters:
d – Object to save
file_name – file name
sort_keys – If true, the keys will be sorted before saving
compact – If given, a compact representation will be tried
Remarks:
Supported formats are json, yaml
If None is given, the file will be created but will be empty
Numpy arrays will be converted to lists before being dumped