histogram_intervals¶
-
astropy.stats.
histogram_intervals
(n, breaks, totals)[source] [edit on github]¶ Histogram of a piecewise-constant weight function.
This function takes a piecewise-constant weight function and computes the average weight in each histogram bin.
Parameters: - n : int
The number of bins
- breaks : array of floats of length N
Endpoints of the intervals in the PDF
- totals : array of floats of length N-1
Probability densities in each bin
Returns: - h : array of floats
The average weight for each bin