title: TypeError: list indices must be integers, not tuple when trying to alter certain elements of a list of arrays
body: <p>I have a list of 2 by n arrays of x and y coordinates. </p>
  
  <pre><code>old: [array([[1, 2, 3], [4, 5, 6]]), array([[10, 20, 30], [40, 50, 60]])]
  </code></pre>
  
  <p>I am trying to shift the y-coordinates, the second row of each array, by a certain value 'shift'. However, when I try to do this by the method below, I get the an error: </p>
  
  <blockquote>
    <p>"TypeError: list indices must be integers, not tuple when trying to alter certain elements of a list of arrays."</p>
  </blockquote>
  
  <pre><code>import pylab
  
  
      def shiftY(old,shift):
          new = list([])
  
          for i in arange(len(old)):
              y = old[i][1,:] + shift
              newItem = array([old[:,0],y])
              new.append(newItem)
  
          return new
  
      old = list()
      old.append(arr
  
  ay([[1, 2, 3], [4, 5, 6]]))
  old.append(array([[10,20,30],[40,50,60]]))
  shift =3 
  new=shiftY(old,shift)
  print(new)
  </code></pre>
  
  <p>Traceback:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Python27_32bit\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
      execfile(filename, namespace)
    File "C:/Users/tald574/testShifty.py", line 25, in &lt;module&gt;
      new=shiftY(old,shift)
    File "C:/Users/tald574/testShifty.py", line 15, in shiftY
      newItem = array([old[:,0],y])
  TypeError: list indices must be integers, not tuple
  </code></pre>
  
  <p>I can't see what I am doing wrong as <code>newItem</code> is not even supposed to be a list, it should be a 2D array. Would appreciate it if someone can tell me what I do wrong an how to fix it.</p>
  
  <p>Thanks.</p>
  
  <p>Edit:
  The expected outcome of this test would be,</p>
  
  <pre><code>new:[array([[1, 2, 3], [7, 8, 9]]), array([[10, 20, 30], [43, 53, 63]])]
  </code></pre>