-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
https://numpy.org/doc/stable/reference/generated/numpy.bincount.html?
It solves a very challenging problem that otherwise has to be done in Python:
# Reset the frequency histogram.
freq_histogram[:, :, :] = 0
# Flatten 3D index: (y, x, f) → idx
flat_idx = (y_bins * X_BINS + x_bins) * FREQ_BINS + freq_indices
# Update the frequency histogram.
for i in range(len(target_events)):
freq_histogram[flat_idx[i]] += gain[i]
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request