class_docstr: Stream that uniformly selects n out of k given transforms.
class_docstr_tok: ["Stream","that","uniformly","selects","n","out","of","k","given","transforms","."]
docstr: Constructor.
  
  Parameters
  ----------
  transforms : list
      List of k transforms to sample from
  n : int
      How many transform to sample
  optimize_stack : bool
      Whether to execute stack optimization for augmentations.
docstr_tok: ["Constructor",".","Parameters","--","--","--","--","--","transforms",":","list","List","of","k","transforms","to","sample","from","n",":","int","How","many","transform","to","sample","optimize_stack",":","bool","Whether","to","execute","stack","optimization","for","augmentations","."]
code: def __init__(
      self,
      transforms=None,
      n=1,
      probs=None,
      optimize_stack=False,
      ignore_fast_mode=False,
  ):
      """
      Constructor.
  
      Parameters
      ----------
      transforms : list
          List of k transforms to sample from
      n : int
          How many transform to sample
      optimize_stack : bool
          Whether to execute stack optimization for augmentations.
      """
      super(SelectiveStream, self).__init__(
          transforms=transforms,
          optimize_stack=optimize_stack,
          ignore_fast_mode=ignore_fast_mode,
      )
      if transforms is None:
          transforms = []
      if n < 0 or n > len(transforms):
          raise ValueError
      if probs is not None:
          if len(probs) != len(transforms):
              raise ValueError
      self.n = n
      self.probs = probs
  
file_path: solt/solt/core/_core.py
imports: import numpy
  from ._base_transforms import BaseTransform, MatrixTransform
  import copy
  import random
  from solt.utils import Serializable
  from ._data import DataContainer
label_desc: Use image node_id 1 to create a new SelectiveStream object from inherited base classes: Stream with example: obj = SelectiveStream(transforms, n, probs, optimize_stack, ignore_fast_mode)