Skip to content

Commit

Permalink
Update seir.py
Browse files Browse the repository at this point in the history
  • Loading branch information
emprzy committed Dec 17, 2024
1 parent 80f98cb commit ba683da
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion flepimop/gempyor_pkg/src/gempyor/seir.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,27 @@
logger = logging.getLogger(__name__)

# TO DO: Write documentation for this function
# TO DO: include dtype hints for arguments
def neg_params(
parsed_parameters: np.ndarray,
parameter_names: list[str],
dates: pd.DatetimeIndex,
subpop_names: list[str]
) -> None:
"""
Identifies and reports earliest negative values for parameters.
Args:
parsed_parameters: An array of parameter values.
parameter_names: A list of the names of parameters.
dates: A pandas DatetimeIndex containing the dates.
subpop_names: A list of the names of subpopulations.
Raises:
ValueError: Negative parameter values were detected.
Returns:
None
"""
if ((parsed_parameters)< 0).any():
negative_index_parameters = np.argwhere(parsed_parameters<0)
unique_param_sp_combinations = []
Expand Down

0 comments on commit ba683da

Please sign in to comment.