Skip to content

Commit

Permalink
Fix formatting back-end
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenherje committed Dec 19, 2024
1 parent 6b9b179 commit 9b94e94
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend_py/primary/primary/routers/timeseries/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,13 @@ async def get_statistical_vector_data_per_sensitivity(
ret_data: list[schemas.VectorStatisticSensitivityData] = []
if not sensitivities:
return ret_data


requested_realizations_mask = pc.is_in(vector_table["REAL"], value_set=pa.array(realizations)) if realizations else None
requested_realizations_mask = (
pc.is_in(vector_table["REAL"], value_set=pa.array(realizations)) if realizations else None
)
for sensitivity in sensitivities:
for case in sensitivity.cases:
sens_case_realization_mask = pc.is_in(vector_table["REAL"], value_set=pa.array(case.realizations))
sens_case_realization_mask = pc.is_in(vector_table["REAL"], value_set=pa.array(case.realizations))
if requested_realizations_mask is not None:
sens_case_realization_mask = pc.and_(requested_realizations_mask, sens_case_realization_mask)
table = vector_table.filter(sens_case_realization_mask)
Expand Down

0 comments on commit 9b94e94

Please sign in to comment.