negmas.helpers.dump(d: Any, file_name: Union[str, os.PathLike, pathlib.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_EXTENSION will be used

  • 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


  • 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