title: Iterating over numpy array rows in python
body: <p>I am trying to iterate over the rows of two numpy arrays in python, using the following for loop:</p>
  
  <pre><code>for i, j in range(X.shape[0]), range(y.shape[0]):
  </code></pre>
  
  <p>But I am getting the following error:</p>
  
  <pre><code>ValueError: too many values to unpack (expected 2)
  </code></pre>
  
  <p>I thought that by creating lists with the number of rows in each array I could iterate over X using the value of i, and over y using the value of j. </p>
  
  <p>Could somebody please explain why this is not working, and how I could make it work instead? Thanks!</p>