title: python object attribute modification
body: <p>This is really surprising for me (and costly in terms of hours spent debugging):</p>
  <pre><code>class Test():
      def __init__(self):
          self.init_value = np.array([1, 2])
      
      def func(self):
          test = self.init_value
          test[-1] = 0
          return test
  test = Test()
  print(test.init_value)
  test.func()
  print(test.init_value)
  </code></pre>
  <p>My questions are:</p>
  <ol>
  <li>Is this because of the properties of numpy arrays (deep copy)?</li>
  <li>Is there a way to &quot;fix&quot; object attributes unless I explicitly modify them?</li>
  </ol>