Skip to content

Commit

Permalink
Implementing Tim's suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
emprzy committed Nov 13, 2024
1 parent d844ced commit 2cbf2ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flepimop/gempyor_pkg/src/gempyor/seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def get_from_config(self, sim_id: int, modinf) -> nb.typed.Dict:
seeding = pd.DataFrame(columns=["date", "subpop"])
return _DataFrame2NumbaDict(df=seeding, amounts=[], modinf=modinf)
else:
raise ValueError(f"Unknown seeding method [received: '{method}'].")
raise ValueError(f"Unknown seeding method given, '{method}'.")

# Sorting by date is very important here for the seeding format necessary !!!!
# print(seeding.shape)
Expand All @@ -159,7 +159,7 @@ def get_from_config(self, sim_id: int, modinf) -> nb.typed.Dict:
elif method == "FolderDraw" or method == "FromFile":
amounts = seeding["amount"]
else:
raise ValueError(f"Unknown seeding method [received: '{method}'].")
raise ValueError(f"Unknown seeding method given, '{method}'.")

return _DataFrame2NumbaDict(df=seeding, amounts=amounts, modinf=modinf)

Expand Down
4 changes: 2 additions & 2 deletions flepimop/gempyor_pkg/src/gempyor/seir.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def build_step_source_arg(
integration_method = "rk4.jit"
if integration_method not in ["rk4.jit", "legacy"]:
raise ValueError(
f"Unknown integration method [received: '{integration_method}']."
f"Unknown integration method given, '{integration_method}'."
)
if "dt" in modinf.seir_config["integration"].keys():
dt = float(
Expand Down Expand Up @@ -188,7 +188,7 @@ def steps_SEIR(
seir_sim = steps_experimental.rk4_aot(**fnct_args)
else:
raise ValueError(
f"Unknown integration method [received '{integration_method}']."
f"Unknown integration method given, '{integration_method}'."
)

# We return an xarray instead of a ndarray now
Expand Down

0 comments on commit 2cbf2ed

Please sign in to comment.