uvex_transients.models.core.priors.NormalPrior.sample#

NormalPrior.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 is 1.

  • rng (numpy.random.Generator, int, or None, optional) –

    Random-number source.

    Passing a Generator is recommended when sampling from multiple priors so that all draws come from the same reproducible random sequence.

Returns:

A one-dimensional float64 array with shape (size,).

Return type:

numpy.ndarray

Raises:

ValueError – If the subclass returns an incorrect number of samples.