import numpy as np
# -----------------
data = [88,93,184,91,107,170,88,107,167,90];
# -----------------
# get PDF:
ydata,xdata = np.histogram(data,bins=np.size(data),normed=True);
# ----------------
# get CDF:
cdf = np.cumsum(ydata*np.diff(xdata));
# -----------------
print 'Sum:',np.sum(ydata*np.diff(xdata))