parameters: (a: np.ndarray, p: np.ndarray = None)
return_statement: return _RANDOM_GENERATOR.choice(a, p=p)
docstring: Generates a random sample from a given 1-D array.
  
      Parameters
      ----------
      a : np.ndarray
          A random sample is generated from its elements.
      p : np.ndarray
          The probabilities associated with each entry in a.
  
      Returns
      -------
      np.ndarray
          arrays with results and their shapes
docstring_summary: Generates a random sample from a given 1-D array.
docstring_tokens: Generates a random sample from a given 1 - D array .
function: def choice(a: np.ndarray, p: np.ndarray = None):
      """Generates a random sample from a given 1-D array.
  
      Parameters
      ----------
      a : np.ndarray
          A random sample is generated from its elements.
      p : np.ndarray
          The probabilities associated with each entry in a.
  
      Returns
      -------
      np.ndarray
          arrays with results and their shapes
      """
      return _RANDOM_GENERATOR.choice(a, p=p)
function_tokens: def choice ( a : np . ndarray , p : np . ndarray = None ) : return _RANDOM_GENERATOR . choice ( a , p = p )