title: Are numpy arrays passed by reference?
body: <p>I came across the fact that <code>numpy</code> arrays are passed by reference at multiple places, but then when I execute the following code, why is there a difference between the behavior of <code>foo</code> and <code>bar</code></p>
  
  <pre><code>import numpy as np
  
  def foo(arr):
     arr = arr - 3
  
  def bar(arr):
     arr -= 3
  
  a = np.array([3, 4, 5])
  foo(a)
  print a # prints [3, 4, 5]
  
  bar(a)
  print a # prints [0, 1, 2]
  </code></pre>
  
  <p>I'm using python 2.7 and numpy version 1.6.1</p>