Commit 9d7d010e authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Use numpy version of min/max rather than the stock version. Cuts down th...

Use numpy version of min/max rather than the stock version. Cuts down th analysis from 5.86s to 1.47s on a test case.
parent c101140b
...@@ -349,8 +349,8 @@ def analysis(idx, obs): ...@@ -349,8 +349,8 @@ def analysis(idx, obs):
# TODO : could we simplify and/or optimize the two loops below? # TODO : could we simplify and/or optimize the two loops below?
for par, val in enumerate(analysed_averages): for par, val in enumerate(analysed_averages):
min_hist[par] = min(values[:,par]) min_hist[par] = np.min(values[:,par])
max_hist[par] = max(values[:,par]) max_hist[par] = np.max(values[:,par])
for i, val in enumerate(analysed_averages): for i, val in enumerate(analysed_averages):
if all((x == model_variables[0, i] or x == -99.) if all((x == model_variables[0, i] or x == -99.)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment