Skip to content

Commit

Permalink
fixing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed Sep 30, 2024
1 parent 5ad8d2d commit 8754af2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion beast/physicsmodel/grid_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ def compute_bin_boundaries(tab):
tab2[0] = tab[0] - np.diff(tab)[0] / 2.0
tab2[-1] = tab[-1] + np.diff(tab)[-1] / 2.0
tab2[1:-1] = temp
return tab2
return tab2
5 changes: 3 additions & 2 deletions beast/tools/verify_beast_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ def verify_one_input_format(param, param_name, param_format, param_lim):
elif "float" in param_format:
if len(param) > 3:
tparam = param[0:3]
if param[3] not in ["log", "lin"]:
raise ValueError(f"4th element in {param_name} is not log or lin")
if isinstance(param[3], str):
if param[3] not in ["log", "lin"]:
raise ValueError(f"4th element in {param_name} is not log or lin")

Check warning on line 75 in beast/tools/verify_beast_settings.py

View check run for this annotation

Codecov / codecov/patch

beast/tools/verify_beast_settings.py#L74-L75

Added lines #L74 - L75 were not covered by tests
else:
tparam = param
is_list_of_floats = all(isinstance(item, float) for item in tparam)
Expand Down

0 comments on commit 8754af2

Please sign in to comment.