def cdf(arr, **kwargs):
counts, bin_edges = histogram(arr, **kwargs)<EOL>cdf = cumsum(counts)<EOL>return cdf<EOL>
ARGS
    arr                array to calculate cumulative distribution function

**kwargs
    Passed directly to numpy.histogram. Typical options include:
    bins = <num_bins>
    normed = True|False

DESC
    Determines the cumulative distribution function.