code: def softmax(w, theta=1.0):
      """Takes an vector w of S N-element and returns a vectors where each column
      of the vector sums to 1, with elements exponentially proportional to the
      respective elements in N.
  
      Parameters
      ----------
      w : array of shape = [N,  M]
  
      theta : float (default = 1.0)
              used as a multiplier  prior to exponentiation.
  
      Returns
      -------
      dist : array of shape = [N, M]
          Which the sum of each row sums to 1 and the elements are exponentially
          proportional to the respective elements in N
  
      """
      w = np.atleast_2d(w)
      e = np.exp(np.array(w) / theta)
      dist = e / np.sum(e, axis=1).reshape(-1, 1)
      return dist
  
file_path: DESlib/deslib/util/prob_functions.py
imports: import numpy
  from scipy.special import betainc
  from scipy.stats import entropy
label_desc: Use image node_id 6 for calling a global function with example usage: softmax(w, theta) and returns: dist