create_sampler
- romanisim.cr.create_sampler(pdf, x)
A function for performing inverse transform sampling.
- Parameters:
- pdfcallable
A function or empirical set of tabulated values that can be used to call or evaluate x.
- x1D array of floats
A grid of values where the pdf should be evaluated.
- Returns:
- inverse_cdfcallable
Callable that gives the cumulative distribution function that allows sampling from the pdf distribution within the bounds described by the grid x.