magpie.randoms.randoms_pdf
- magpie.randoms.randoms_pdf(x, pdf, size[, kind='cubic'])
Generates randoms from a given probability distribution function by first calculating a CDF.
- Parameters
- xmidarray
Linearly spaced x-values given at the middle of a bin of length dx.
- pdfarray
Probabilty distribution function.
- sizeint
Size of the random sample.
- kindstr, optional
Scipy CDF interpolation kind.
- Returns
- randsarray
Randoms drawn from sample PDF.