Closed viktor40 closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.87%. Comparing base (
953f799
) to head (30faaf2
). Report is 10 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Currently
pysteps.postprocesing.ensemblestats.excprob
copies the input array only to replace all values afterwards by either a0
or a1
. It is much more efficient to just initialize an array of the same shape usingnp.zeros()
. By doing this, the code can also be simplified by removing the part of the code setting values to0
.Below, is example code showing the difference in performance between the two methods. This is for a
700x700
grid with 12 timesteps and 24 ensemble members. This shows a significant difference. The specific part of the code is sped up by four orders of magnitude, going from taking153 ms
to20.5 µs
.