title: Sigma Notation in Python
body: <p>I am trying to create a sigma sum in python.</p>
  
  <p>I have a 100 by 100 matrix (created with numpy) and I have a list of 100 values.
  My matrix is the variable A, and my list is the variable Network.</p>
  
  <p>The sum should look like so. </p>
  
  <pre><code>hi= Sigma( (A[i][j])* Network[j])
  </code></pre>
  
  <p>i and j in the matrix refer to the specific value, and j in Network refers to the value in the list.</p>
  
  <p>so, if I wanted h67, the sum would be:</p>
  
  <pre><code>(A[67][67]*Network[67]) + (A[67][66]*Network[66]) + (A[67][65*Network[65]) + ...
  (A[67][0]*Network[0]).
  </code></pre>
  
  <p>My code is as follows, but I don't think it is right.</p>
  
  <pre><code>def new_sum(i,j):
      hi=0
      hi+= numpy.sum((A[i][j]*Network[j]))
      return hi
  </code></pre>
  
  <p>What should I do?</p>