Skip to content

Commit 7f024d2

Browse files
committed
correct exposures with total zero value
1 parent 4f9fe14 commit 7f024d2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

climada/entity/exposures/black_marble.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,6 @@ def _set_econ_indicators(exp, gdp, inc_grp):
505505
gdp (float): GDP to interpolate in the region
506506
inc_grp (float): index to weight exposures in the region
507507
"""
508-
exp.value = np.power(exp.value, 3)
509508
if exp.value.sum() > 0:
509+
exp.value = np.power(exp.value, 3)
510510
exp.value = exp.value/exp.value.sum()* gdp * (inc_grp+1)
511-
else:
512-
exp.value = 0.0

0 commit comments

Comments
 (0)