Skip to content

Commit

Permalink
avoid allocating 1.46 Exbibytes of memory
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl committed Jun 24, 2024
1 parent ee319fb commit cee2211
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion benchmarks/backgrounds/ecal_backwards.org
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ for collection_name in ["EcalEndcapNHits", "EcalEndcapPHits"]:
for ix, vals in enumerate([xs, ys]):
centers = np.unique(vals)
diffs = centers[1:] - centers[:-1]
bin_widths[ix] = np.min(diffs[diffs > 0]) if np.sum(diffs > 0) > 0 else 1.
EPSILON = 1-e5
bin_widths[ix] = np.min(diffs[diffs > EPSILON]) if np.sum(diffs > EPSILON) > 0 else 1.
print(f"bin_widths[{ix}]", bin_widths[ix])

bins = {
Expand Down

0 comments on commit cee2211

Please sign in to comment.