InverseCDFSampler¶
-
class
gammapy.utils.random.InverseCDFSampler(pdf, axis=None, random_state=0)[source]¶ Bases:
objectInverse CDF sampler.
It determines a set of random numbers and calculate the cumulative distribution function.
Parameters: - pdf :
Map Map of the predicted source counts.
- axis : int
Axis along which sampling the indexes.
- random_state : {int, ‘random-seed’, ‘global-rng’,
RandomState} Defines random number generator initialisation. Passed to
get_random_state.
Methods Summary
sample(self, size)Draw sample from the given PDF. sample_axis(self)Sample along a given axis. Methods Documentation
- pdf :