astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Astrostatistics Tools (`astropy.stats`) »
- histogram_intervals

# histogram_intervals

astropy.stats.histogram_intervals(n, breaks, totals)

  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 `python:int`

      The number of bins

    breaks(N,) `array` of `python:float`

      Endpoints of the intervals in the PDF

    totals(N-1,) `array` of `python:float`

      Probability densities in each bin

  Returns:
    h `array` of `python:float`

      The average weight for each bin