Sample.__init__#

Sample.__init__(population, k, counts=None)[source]

Create a new Sample asset space.

The sample is drawn from the population. The parameter k can be either an integer or a pair of integers representing the range from which to draw the sample size.

Parameters:
  • population (list[Any]) – The population to sample from.

  • k (int | tuple[int, int]) – The number of values to sample.

  • counts (list[int] | None) – The counts for each element in the population.