title: Correct usage of numpy.nditer?
body: <p>I'm trying to do an array operation with <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.nditer.html" rel="nofollow">numpy.nditer</a>, but don't get the expected result.</p>
  
  <p>My code is</p>
  
  <pre><code>import numpy as np
  arr1 = - np.random.random((2,2))
  arr2 = np.random.random((2,2))
  arr = np.zeros((2,2))
  it = np.nditer([arr1, arr2, arr], [], [['readonly'], ['readonly'], ['writeonly']])
  for a1, a2, a in it:
      a = a1 if -a1 &lt; a2 else a2
  print arr
  print it.operands[2]
  </code></pre>
  
  <p>I'm getting all zero results in both <code>arr</code> and <code>it.operands[2]</code>, but I expected values from either <code>arr1</code> or <code>arr2</code>. What would be the correct way to assign values to <code>arr</code> in the iteration?</p>