def pdf(values, bins):
    '\n    ** Normalized differential area function. **\n    (statistical) probability denisty function\n    normalized so that the integral is 1\n    and. The integral over a range is the\n    probability of the value is within\n    that range.\n\n    Returns array of size len(bins)-1\n    Plot versus bins[:-1]\n    '
    if hasattr(bins, '__getitem__'):
        range = (np.nanmin(bins), np.nanmax(bins))
    else:
        range = None
    (h, x) = np.histogram(values, bins=bins, range=range, density=False)
    pdf = (h / (np.sum(h, dtype=float) * np.diff(x)))
    return (pdf, avg(x))
** Normalized differential area function. **
(statistical) probability denisty function
normalized so that the integral is 1
and. The integral over a range is the
probability of the value is within
that range.

Returns array of size len(bins)-1
Plot versus bins[:-1]
def pdf(values, bins):
    '\n    ** Normalized differential area function. **\n    (statistical) probability denisty function\n    normalized so that the integral is 1\n    and. The integral over a range is the\n    probability of the value is within\n    that range.\n\n    Returns array of size len(bins)-1\n    Plot versus bins[:-1]\n    '
    if hasattr(bins, '__getitem__'):
        range = (np.nanmin(bins), np.nanmax(bins))
    else:
        range = None
    (h, x) = np.histogram(values, bins=bins, range=range, density=False)
    pdf = (h / (np.sum(h, dtype=float) * np.diff(x)))
    return (pdf, avg(x))