(num_classes, min_ways, max_ways, rng=None)
return rng.randint(low=min_ways, high=max_ways + 1)
Samples a number of ways for an episode uniformly and at random.

  The support of the distribution is [min_ways, num_classes], or
  [min_ways, max_ways] if num_classes > max_ways.

  Args:
    num_classes: int, number of classes.
    min_ways: int, minimum number of ways.
    max_ways: int, maximum number of ways. Only used if num_classes > max_ways.
    rng: np.random.RandomState used for sampling.

  Returns:
    num_ways: int, number of ways for the episode.
Samples a number of ways for an episode uniformly and at random.
Samples a number of ways for an episode uniformly and at random .
def sample_num_ways_uniformly(num_classes, min_ways, max_ways, rng=None):
  """Samples a number of ways for an episode uniformly and at random.

  The support of the distribution is [min_ways, num_classes], or
  [min_ways, max_ways] if num_classes > max_ways.

  Args:
    num_classes: int, number of classes.
    min_ways: int, minimum number of ways.
    max_ways: int, maximum number of ways. Only used if num_classes > max_ways.
    rng: np.random.RandomState used for sampling.

  Returns:
    num_ways: int, number of ways for the episode.
  """
  rng = rng or RNG
  max_ways = min(max_ways, num_classes)
  return rng.randint(low=min_ways, high=max_ways + 1)
def sample_num_ways_uniformly ( num_classes , min_ways , max_ways , rng = None ) : rng = rng or RNG max_ways = min ( max_ways , num_classes ) return rng . randint ( low = min_ways , high = max_ways + 1 )