title: Iterate over two numpy 2d matrices using nditer
body: <p>I am trying to iterate over two numpy matrices, one of size nx3 and the other of size nx1</p>
  
  <p>I'm trying to get nditer to simultaneously iterate over their rows.</p>
  
  <p>So if we have:</p>
  
  <pre><code>y = np.array([   [ 1],
                   [-1],
                   [ 1]   ])
  x = np.array([[ 1.3432504 , -1.3311479 ,  1.        ],
               [ 1.8205529 , -0.6346681 ,  1.         ],
               [ 0.98632067, -1.8885762 ,  1.         ]])
  </code></pre>
  
  <p>and i try:</p>
  
  <pre><code>for (a,b) in iterator:
     print(a)
     print(b)
  </code></pre>
  
  <p>this should give </p>
  
  <pre><code>[1]
  [ 1.3432504 , -1.3311479 ,  1.        ]
  [-1]
  [ 1.8205529 , -0.6346681 ,  1.         ]
  [1]
  [ 0.98632067, -1.8885762 ,  1.         ]
  </code></pre>
  
  <p>I tried np.nditer with 'external_loop flag', i get the desired output for x but it forces y into bunches of 3 elements when i only want one at a time.</p>
  
  <p>Thank you in advance.</p>