Skip to content

Commit

Permalink
Update ouu.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anirban-chaudhuri committed Aug 1, 2024
1 parent 39e9483 commit de99a42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyciemss/ouu/ouu.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,18 @@ def __call__(self, x):
"Selected interventions are out of bounds. Will use a penalty instead of estimating risk."
)
risk_estimate = max(
2 * self.risk_bound, 10.0
2 * np.array(self.risk_bound), 10.0
) # used as a penalty and the model is not run
else:
# Apply intervention and perform forward uncertainty propagation
samples = self.propagate_uncertainty(x)
# Compute quanity of interest
sample_qoi = [q(samples) for q in self.qoi]
print(len(sample_qoi))
# print(len(sample_qoi))
# Estimate risk
risk_estimate = np.full(len(self.qoi), np.nan)
for i in range(len(self.qoi)):
print(sample_qoi[i].shape)
# print(sample_qoi[i].shape)
risk_estimate[i] = self.risk_measure[i](sample_qoi[i])
return risk_estimate

Expand Down

0 comments on commit de99a42

Please sign in to comment.