title: Softmax activation function using math library
body: <p>I am trying to develop a softmax function in python for my backpropagation and gradient descent program. I am calling the softmax function after I get my outputs of the output layer (2 outputs), the outputs are in a vector-like so <code>[0.844521, 0.147048]</code>, and my current softmax function I have implemented is like this:</p>
  <pre><code>import math
  
  vector = [0.844521, 0.147048]
  def soft_max(x):
      e = math.exp(x)
      return e / e.sum()
  print(soft_max(vector))
  </code></pre>
  <p>However, when i run it i get the following error</p>
  <pre><code>TypeError: must be real number, not list
  </code></pre>
  <p>Note:
  I only want to use the math library and no others</p>