Skip to content
Snippets Groups Projects
Commit d891c2fe authored by Alexander Heidelbach's avatar Alexander Heidelbach
Browse files

Formatting

parent b5e73f31
Branches
No related tags found
No related merge requests found
......@@ -7,7 +7,14 @@ import zfit
import zfit.core
import json
__all__ = ["PathType", "OutputType", "set_obs", "clear_existing_parameters", "write_json", "read_json"]
__all__ = [
"PathType",
"OutputType",
"set_obs",
"clear_existing_parameters",
"write_json",
"read_json",
]
PathType = Union[str, AnyStr, os.PathLike]
OutputType = Dict[str, Any]
......@@ -49,7 +56,9 @@ def clear_existing_parameters() -> None:
del zfit.Parameter._existing_params[param]
def write_json(array: Union[np.ndarray, list, dict, pd.DataFrame], savepath: PathType) -> PathType:
def write_json(
array: Union[np.ndarray, list, dict, pd.DataFrame], savepath: PathType
) -> PathType:
if isinstance(array, dict):
with open(savepath, "w") as f:
json.dump(array, f, indent=4)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment