title: Simple Iteration Array Error Python
body: <p>This code is trying to take two simple arrays and apply them to a function and spit the results out into a new array.  I have tried several different fixes from Stack and nothing seems to be helping.  The code is giving an "index 15 is out of bounds for axis 0 with size 4" error.  It is also worth noting that this is my first Python code so I am struggling a bit.  I am much more used to Java.  I'm assuming its a simple error, however I have yet to find the solution on Stack.</p>
  
  <pre><code>import math
  import numpy as np
  
  aVec = np.array ([3.14, 15, 9, 26]);
  bVec = np.array ([[2.71], [8], [28], [182]]);
  
  lengthaVec = len(aVec);
  yVec = [lengthaVec]
  i = 0;
  for i in aVec:
     yVec.append (math.sqrt(math.pow(np.transpose((aVec[i])), 2) +             math.pow(bVec[i], 2)));
  
  print yVec
  </code></pre>