yaw.core.math.rebin#
- yaw.core.math.rebin(bins_new: ndarray[Any, dtype[float64]], bins_old: ndarray[Any, dtype[float64]], counts_old: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]][source]#
Recompute compute histogram counts for a new binning.
The new counts are computed by summing the fractional contribution of the counts from the original binning to the binning. The new binning may exceed or just partially cover the range of the original binning.
- Parameters:
bins_new (
NDArray) – The new bin edges on which the counts are reevaluated.bins_old (
NDArray) – The bin edges from which the original counts were computed.counts_old (
NDArray) – The original histogram counts.
- Returns:
The histogram counts for the new binning.
- Return type:
NDArray
Note
Implemented as C extension.