Skip to content

Commit

Permalink
Small cleanup [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
micheles committed Nov 18, 2024
1 parent a6fa5f6 commit 3c4aa5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openquake/risklib/riskmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,8 @@ def compute_csq(self, assets, dd5, tmap_df, oq):
# dict loss_type -> coeffs for the given loss type
for pi, peril in enumerate(self.perils):
if len(df) == 1:
w = 1.
else:
[w] = df.weight
else: # assume one weigth per peril
[w] = df[df.peril == peril].weight
coeff = (dd5[pi, :, :, li, 1:] @
coeffs[risk_id][peril][lt] * w)
Expand Down

0 comments on commit 3c4aa5f

Please sign in to comment.