code: def _extalg(xarr, alpha=100, axis=None):
      '''Given an array xarr of values, smoothly return the max/min'''
      return (np.sum(xarr * np.exp(alpha*xarr), axis=axis, keepdims=True)/
                  np.sum(np.exp(alpha*xarr), axis=axis, keepdims=True)f _extalg(xarr, alpha=100, axis=None):
      '''Given an array xarr of values, smoothly return the max/min'''
      return (np.sum(xarr * np.exp(alpha*xarr), axis=axis, keepdims=True)/
                  np.sum(np.exp(alpha*xarr), axis=axis, keepdims=True))
docs: Given an array xarr of values, smoothly return the max/min