Skip to content

Commit

Permalink
Fixed view_delta_loss
Browse files Browse the repository at this point in the history
  • Loading branch information
micheles committed Apr 12, 2021
1 parent 800cc14 commit 091e059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openquake/calculators/views.py
Expand Up @@ -1032,7 +1032,7 @@ def view_delta_loss(token, dstore):
df = dstore.read_df('agg_loss_table', 'event_id',
dict(agg_id=K, loss_id=li))
if len(df) == 0: # for instance no fatalities
return {}
return {'delta': numpy.zeros(1)}
mod2 = df.index % 2
losses0 = df['loss'][mod2 == 0]
losses1 = df['loss'][mod2 == 1]
Expand Down

0 comments on commit 091e059

Please sign in to comment.