astro py:docs

- Index
- Modules

### Navigation

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

# cdf_from_intervals

astropy.stats.cdf_from_intervals(breaks, totals)

  Construct a callable piecewise-linear CDF from a pair of arrays.

  Take a pair of arrays in the format returned by fold_intervals and make a callable cumulative distribution function on the interval (0,1).

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

      The boundaries of successive intervals.

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

      The weight for each interval.

  Returns:
    f `python:callable()`

      A cumulative distribution function corresponding to the piecewise-constant probability distribution given by breaks, weights