Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
anirban-chaudhuri committed Apr 15, 2024
1 parent 7f4ef18 commit b84fc2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions pyciemss/integration_utils/result_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ def cdc_format(
)
# Number of days for which data is available
number_data_days = max(
q_ensemble_data[q_ensemble_data["Forecast_Backcast"].str.contains("Backcast")][
f"number_{time_unit}"
]
q_ensemble_data[
q_ensemble_data["Forecast_Backcast"].str.contains("Backcast")
][f"number_{time_unit}"]
)
drop_column_names.extend(["Forecast_Backcast"])
drop_column_names.extend(["Forecast_Backcast"])
# Subtracting number of backast days from number_days
q_ensemble_data[f"number_{time_unit}"] = (
q_ensemble_data[f"number_{time_unit}"] - number_data_days
Expand All @@ -311,7 +311,9 @@ def cdc_format(
if solution_string_mapping:
# Drop rows that are not present in the solution_string_mapping keys
q_ensemble_data = q_ensemble_data[
q_ensemble_data["output"].str.contains("|".join(solution_string_mapping.keys()))
q_ensemble_data["output"].str.contains(
"|".join(solution_string_mapping.keys())
)
]
for k, v in solution_string_mapping.items():
q_ensemble_data["output"] = q_ensemble_data["output"].replace(k, v)
Expand Down
4 changes: 3 additions & 1 deletion pyciemss/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def ensemble_sample(
# logging_times = torch.arange(
# start_time + logging_step_size, end_time, logging_step_size
# )
logging_times = torch.arange(start_time, end_time + logging_step_size, logging_step_size)
logging_times = torch.arange(
start_time, end_time + logging_step_size, logging_step_size
)

# Check that num_samples is a positive integer
if not (isinstance(num_samples, int) and num_samples > 0):
Expand Down

0 comments on commit b84fc2c

Please sign in to comment.