uvex_transients.models.core.priors.ConstantPrior.sample#
- ConstantPrior.sample(size: int = 1, *, rng: Generator | int | None = None) NDArray[float64]#
Draw random samples from the prior.
- Parameters:
size (
int, optional) – Number of samples to draw. Must be a positive integer. The default is1.rng (
numpy.random.Generator,int, orNone, optional) –Random-number source.
Passing a
Generatoris recommended when sampling from multiple priors so that all draws come from the same reproducible random sequence.
- Returns:
A one-dimensional
float64array with shape(size,).- Return type:
- Raises:
ValueError – If the subclass returns an incorrect number of samples.