code: def logsumexp(arr, axis=0):
      """Computes the sum of arr assuming arr is in the log domain.
  
      Returns log(sum(exp(arr))) while minimizing the possibility of
      over/underflow.
  
      Examples
      --------
  
      >>> import numpy as np
      >>> from sklearn.utils.extmath import logsumexp
      >>> a = np.arange(10)
      >>> np.log(np.sum(np.exp(a)))
      9.4586297444267107
      >>> logsumexp(a)
      9.4586297444267107
      """
      arr = np.rollaxis(arr, axis)
      # Use the max to normalize, as with the log this is what accumulates
      # the less errors
      vmax = arr.max(axis=0)
      out = np.log(np.sum(np.exp(arr - vmax), axis=0))
      out += vmax
      return out
  
imports: from __future__ import division
  from functools import partial
  import warnings
  import numpy
  from scipy import linalg
  from scipy.sparse import issparse, csr_matrix
  from .None import check_random_state
  from .fixes import np_version
  from ._logistic_sigmoid import _log_logistic_sigmoid
  from ..externals.six.moves import xrange
  from .sparsefuncs_fast import csr_row_norms
  from .validation import check_array
  from ..exceptions import NonBLASDotWarning
label_desc: Use image node_id 12 for calling a global function with example usage: logsumexp(arr, axis) and returns: out