bilby.core.utils.io.safe_file_dump

bilby.core.utils.io.safe_file_dump(data, filename, module)[source]

Safely dump data to a .pickle file

Parameters:
data:

data to dump

filename: str

The file to dump to

module: pickle, dill, str

The python module to use. If a string, the module will be imported