Skip to content

[FEATURE REQUEST] Support for bincount? #737

@kwagyeman

Description

@kwagyeman

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

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions