title: Select multiple elements from python array
body: <p>How can I select multiple elements from a python array? I know that this is possible in numpy array but I cannot use numpy array in this case. I want to select certain elements of an array similar to masked array usage but i get following error in python</p>
  
  <pre><code> nonzero = numpyarray.nonzero()
   pythonarray[nonzero] = numpyarray[nonzero]
   *** TypeError: only integer arrays with one element can be converted to an index
  </code></pre>
  
  <p><code>numpyarray[nonzero]</code> works fine but I cannot access <code>pythonarray[nonzero]</code>. Is there a way to do this in python array? </p>