save_obj#
- save_obj(obj: Any, path: Union[str, CloudPath, Path], **kwargs) None [source]#
Save an object as a pickle (can save any Python objects).
>>> output_pkl = 'D:/path/to/pickle.pkl' >>> pkl_dict = {"A": np.ones([3, 3]), "B": datetime.today(), "C": SomeEnum.some_name} >>> save_json(output_pkl, pkl_dict)
- Parameters:
obj (Any) – Any object serializable
path (AnyPathStrType) – Path where to write the pickle