Skip to content

Commit

Permalink
sum in quadrature using generator comprehension instead of numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstangl committed Jan 3, 2024
1 parent 47af336 commit 17af1e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flavio/plots/plotfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def error_budget_pie(err_dict, other_cutoff=0.03):
squared total error is smaller than this number, it is lumped under "other".
Defaults to 0.03.
"""
var_tot = np.sum(np.array(list(err_dict.values()))**2) # total variance from sum of squared individual errors
var_tot = sum(v**2 for v in err_dict.values()) # total variance from sum of squared individual errors
err_dict_sorted = OrderedDict(sorted(err_dict.items(), key=lambda t: -t[1]))
labels = []
fracs = []
Expand Down

0 comments on commit 17af1e0

Please sign in to comment.