draw

abstractmethod CorrelatedDistribution.draw(rng, size=None)

Draws one or more samples from the distribution.

In this context, one sample refers to a set of correlated values.

Parameters:
  • rng (np.random.Generator) – A random generator to use to draw samples.

  • size (int | tuple[int] | None) – The number of samples or size of the output array.

Returns:

One or more samples drawn from the distribution. If size is None, an array containing a single value for each variable should be returned. Otherwise, an array of shape (size, num_variables) should be returned, where elements with the same indeces corresponding to size are correlated.

Return type:

ndarray