Getting the CDF of a distribution given the PDF using NumPy

dX = 0.01 # X distance between values inside PDF
cdf = np.cumsum(pdf*dX)

References: