Commit 1845ca13 authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Fully vectorise the computation of min/max values for the histogram.

parent 8468e482
......@@ -343,10 +343,8 @@ def analysis(idx, obs):
var = np.empty((Npdf, len(analysed_averages)))
pdf = np.empty((Npdf, len(analysed_averages)))
# TODO : could we simplify and/or optimize the two loops below?
for par, val in enumerate(analysed_averages):
min_hist[par] = np.min(values[:,par])
max_hist[par] = np.max(values[:,par])
min_hist = np.min(values, axis=0)
max_hist = np.max(values, axis=0)
for i, val in enumerate(analysed_averages):
if min_hist[i] == max_hist[i]:
......
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