title: Modifying a numpy array inside a function?
body: <p>I have a problem with the simple program below :</p>
  
  <pre><code>def my_function(my_array = np.zeros(0)):
      my_array = [1, 2, 3]
  
  my_array = np.zeros(0)
  my_function(my_array)
  print my_array
  </code></pre>
  
  <p>It prints an empty array as if <code>my_array</code> was passed by copy and not by reference inside the function. How to correct that ?</p>