title: Finding percentage change with Numpy
body: <p>I'm writing a function to find the percentage change using Numpy and function calls. So far what I got is:</p>
  
  <pre><code>def change(a,b):
    answer = (np.subtract(a[b+1], a[b])) / a[b+1] * 100
    return answer
  
  print(change(a,0))
  </code></pre>
  
  <p>"a" is the array I have made and b will be the index/numbers I am trying to calculate.</p>
  
  <p>For example:</p>
  
  <p>My Array is</p>
  
  <pre><code>[[1,2,3,5,7]
   [1,4,5,6,7]
   [5,8,9,10,32]
   [3,5,6,13,11]]
  </code></pre>
  
  <p>How would I calculate the percentage change between 1 to 2 (=0.5) or 1 to 4(=0.75) or 5,7 etc..</p>
  
  <p><strong>Note:</strong> I know how mathematically to get the change, I'm not sure how to do this in python/ numpy.</p>