title: Mapping a NumPy array in place
body: <p><strong>Is it possible to map a NumPy array in place? If yes, how?</strong></p>
  
  <p>Given <code>a_values</code> - 2D array - this is the bit of code that does the trick for me at the moment:</p>
  
  <pre><code>for row in range(len(a_values)):
      for col in range(len(a_values[0])):
          a_values[row][col] = dim(a_values[row][col])
  </code></pre>
  
  <p>But it's so ugly that I suspect that somewhere within NumPy there must be a function that does the same with something looking like:</p>
  
  <pre><code>a_values.map_in_place(dim)
  </code></pre>
  
  <p>but if something like the above exists, I've been unable to find it.</p>