rex.utilities.bc_utils.sample_cdf

sample_cdf(quantiles, x_values, n_samples)[source]

Randomly draw a number of real values from a CDF.

quantilesnp.ndarray

1D array of quantile values from 0 to 1. Must be monotonic.

x_valuesnp.ndarray

Values on the x-axis of a CDF corresponding to quantiles. Must be monotonic.

n_samplesint

Number of sample to draw

Returns:

samples (np.ndarray) – 1D array of real values sampled from the CDF made up by quantiles and x_values