If I run the following code in Python 2.7, I get [2., 2., 2.] printed for both a and b. Why does b change together with a? Many thanks!
def test_f(x):
    a = np.zeros(3)
    b = a
    for i in range(3):
        a[i] += x
    print a
    print b
    return 0
test_f(2)
 
     
    