Skip to main content

Module histogram

Module histogram 

Source
Expand description

Histogram binning — fills a caller-owned counts buffer, no allocation.

Canonical home for equal-width binning. The caller owns the counts slice (its length sets the bin count) and the returned range describes the binning.

Structs§

HistRange
Range/width metadata for a binning pass.

Functions§

histogram_into
Equal-width histogram into the caller-owned counts buffer (zeroed first). The number of bins is counts.len(). Values outside [min, max] are skipped; a value landing on/above the top edge falls in the last bin. None if the data is empty or counts is empty.