class_docstr: Bootstrap using stratified resampling.
  
  Supports numpy arrays. Data returned has the same type as the input data.
  Data entered using keyword arguments is directly accessibly as an attribute.
  
  To ensure a reproducible bootstrap, you must set the `random_state`
  attribute after the bootstrap has been created. See the example below.
  Note that `random_state` is a reserved keyword and any variable
  passed using this keyword must be an instance of `RandomState`.
  
  Examples
  --------
  Data can be accessed in a number of ways.  Positional data is retained in
  the same order as it was entered when the bootstrap was initialized.
  Keyword data is available both as an attribute or using a dictionary syntax
  on kw_data.
  
  >>> from rliable.library import StratifiedBootstrap
  >>> from numpy.random import standard_normal
  >>> x = standard_normal((5, 50))
  >>> bs = StratifiedBootstrap(x)
  >>> for data in bs.bootstrap(100):
  ...     bs_x = data[0][0]
  >>> bs.conf_int(np.mean, method='percentile', reps=50000)  # 95% CIs for mean
  
  Set the random_state if reproducibility is required.
  
  >>> from numpy.random import RandomState
  >>> rs = RandomState(1234)
  >>> bs = StratifiedBootstrap(x, random_state=rs)
  
  See also: `arch.bootstrap.IIDBootstrap`
  
  Attributes:
    data: tuple, Two-element tuple with the pos_data in the first position and
      kw_data in the second (pos_data, kw_data). Derived from `IIDBootstrap`.
    pos_data: tuple, Tuple containing the positional arguments (in the order
      entered). Derived from `IIDBootstrap`.
    kw_data: dict, Dictionary containing the keyword arguments. Derived from
      `IIDBootstrap`.
class_docstr_tok: ["Bootstrap","using","stratified","resampling",".","Supports","numpy","arrays",".","Data","returned","has","the","same","type","as","the","input","data",".","Data","entered","using","keyword","arguments","is","directly","accessibly","as","an","attribute",".","To","ensure","a","reproducible","bootstrap",",","you","must","set","the","`","random_state","`","attribute","after","the","bootstrap","has","been","created",".","See","the","example","below",".","Note","that","`","random_state","`","is","a","reserved","keyword","and","any","variable","passed","using","this","keyword","must","be","an","instance","of","`","RandomState","`",".","Examples","--","--","--","--","Data","can","be","accessed","in","a","number","of","ways",".","Positional","data","is","retained","in","the","same","order","as","it","was","entered","when","the","bootstrap","was","initialized",".","Keyword","data","is","available","both","as","an","attribute","or","using","a","dictionary","syntax","on","kw_data",".",">",">",">","from","rliable.library","import","StratifiedBootstrap",">",">",">","from","numpy.random","import","standard_normal",">",">",">","x","=","standard_normal","(","(","5",",","50",")",")",">",">",">","bs","=","StratifiedBootstrap","(","x",")",">",">",">","for","data","in","bs.bootstrap","(","100",")",":","...","bs_x","=","data","[","0","]","[","0","]",">",">",">","bs.conf_int","(","np.mean",",","method='percentile","'",",","reps=50000",")","#","95","%","CIs","for","mean","Set","the","random_state","if","reproducibility","is","required",".",">",">",">","from","numpy.random","import","RandomState",">",">",">","rs","=","RandomState","(","1234",")",">",">",">","bs","=","StratifiedBootstrap","(","x",",","random_state=rs",")","See","also",":","`","arch.bootstrap.IIDBootstrap","`","Attributes",":","data",":","tuple",",","Two-element","tuple","with","the","pos_data","in","the","first","position","and","kw_data","in","the","second","(","pos_data",",","kw_data",")",".","Derived","from","`","IIDBootstrap","`",".","pos_data",":","tuple",",","Tuple","containing","the","positional","arguments","(","in","the","order","entered",")",".","Derived","from","`","IIDBootstrap","`",".","kw_data",":","dict",",","Dictionary","containing","the","keyword","arguments",".","Derived","from","`","IIDBootstrap","`","."]
docstr: Selects the indices to sample from the bootstrap distribution.
docstr_tok: ["Selects","the","indices","to","sample","from","the","bootstrap","distribution","."]
code: def update_indices(
      self,
  ) -> Tuple[np.ndarray, ...]:
      """Selects the indices to sample from the bootstrap distribution."""
      # `self._num_items` corresponds to the number of runs
      indices = np.random.choice(
          self._num_items, self._args_shape, replace=True
      )
      if self._task_bootstrap:
          task_indices = np.random.choice(
              self._num_tasks,
              self._strata_indices[0].shape,
              replace=True,
          )
          return (indices, task_indices, *self._strata_indices[1:])
      return (indices, *self._strata_indices)
  
file_path: rliable/rliable/library.py
imports: from typing import Callable, Dict, List, Optional, Tuple, Union, Mapping
  from absl import logging
  import arch.bootstrap
  import numpy
  from numpy import random
label_desc: Use image node_id 3 for calling the StratifiedBootstrap obj's underlying member method code with example usage: obj.update_indices() and returns: indices,  unknown, indices,  task_indices,  unknown