Skip to content

Commit

Permalink
Division by zer le-in,na, orin depending on the numerator, instead of…
Browse files Browse the repository at this point in the history
… raising
  • Loading branch information
dnerini committed Apr 23, 2023
1 parent 0c5d01e commit 3012a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pysteps/verification/salscores.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def sal_structure(
observation_volume = _sal_scaled_volume(observation_objects).sum()
nom = prediction_volume - observation_volume
denom = prediction_volume + observation_volume
return nom / (0.5 * denom)
return np.divide(nom, (0.5 * denom))


def sal_amplitude(prediction, observation):
Expand Down

0 comments on commit 3012a16

Please sign in to comment.